Skip to content

Troubleshooting

Start from the symptom and find the next command to run. Symptoms are grouped roughly in the order you are likely to hit them: startup and auth first, then request failures, sessions, TUI rendering, tool execution, and performance.

Run chord --version in a terminal first to check that the command is available and the program starts. Prebuilt binaries do not need Go; only source builds require checking the Go version and source entry point.

  1. Command not found or blocked by the OS: check the install path. The install script places the binary in /usr/local/bin, which is already on PATH: curl -fsSL https://github.com/keakon/chord/releases/latest/download/install.sh | bash (if that URL returns 404, the latest release does not ship the installer yet — use curl -fsSL https://raw.githubusercontent.com/keakon/chord/main/scripts/install.sh | bash). A go install build lands in $(go env GOPATH)/bin (usually ~/go/bin), which is often missing from PATH; add it with export PATH="$PATH:$(go env GOPATH)/bin", or copy the binary into a directory that is already on PATH with sudo install -m 0755 "$(go env GOPATH)/bin/chord" /usr/local/bin/chord. For downloaded macOS binaries, see Quickstart.
  2. Missing configuration: run chord in an interactive terminal and follow the setup wizard.
  3. Invalid configuration: run chord doctor config and correct the reported YAML or field issues.
  4. Still unable to start: keep the terminal error output, then use the log collection guidance at the end of this page.

The wizard only runs when config.yaml is missing; it does not overwrite an existing malformed file. Without a controlling terminal it returns an initialization error, so complete configuration interactively first.

Run chord doctor config and check startup notices. Keymap diagnostics show the original file, line, and field path; rejected actions also show the effective binding and its source. An invalid project declaration leaves the global binding in effect, including an empty list that disables the shortcut. Correct the reported declaration and restart. See Keybindings for accepted key names and the limited checks for keys handled by an earlier action. When the configuration is valid, check whether your terminal forwards the key.

Check:

  • Whether provider names in auth.yaml match config.yaml
  • Whether the API key is valid
  • Whether OAuth providers have preset: codex

You can run:

chord doctor models

To narrow the check to a known model or model pool:

chord doctor models --model openai/gpt-5.5@high
chord doctor models --pool thinking

Common causes:

  • the key has reached its quota
  • provider rate limiting
  • concurrency or high-frequency requests triggering rate limits

Recommendations:

  • switch to another key
  • reduce concurrency or retries
  • check for accidental looped calls

To diagnose which keys or models are hitting rate limits or errors:

  • Press Ctrl+E in the TUI to open the error panel, which shows all retry errors including 429s with the provider, model, and masked key=... label.
  • Check the error panel to see the pattern: if one specific key is repeatedly hitting 429, that key is rate-limited; if multiple keys on the same provider fail with 503, the provider itself may be degraded.

UI note:

  • the right-side RATE LIMIT panel shows the last Codex rate-limit snapshot (e.g. 5h: 42% 2h30m). When a reset timestamp is reached, the countdown may disappear briefly while Chord refreshes usage; depending on provider semantics (rolling windows), usage may drop gradually rather than jumping straight to 0%.
  • Codex OAuth runtime state is also reloaded from auth.state.json when another Chord process updates that file, so quota snapshots, reset timers, account metadata, and account status changes should appear without restarting the current session.
  • if the RATE LIMIT panel looks stale, enable debug logs with log_level: debug and check chord.log for lines like responses codex ws: rate_limits event ... (received) or responses codex ws: rate_limits event ignored ... (unrecognized / parse failure).

Check:

  • whether the current provider / model exists
  • whether the network can reach the API
  • whether proxy configuration is effective

For example:

curl -I https://api.anthropic.com
curl -I https://api.openai.com/v1

Set trust_http_400: true for endpoints that follow official API error semantics: Chord then treats HTTP 400 as a terminal request error. For retryable errors, the Retry-After header applies as the key cooldown hint, ahead of any configured retry pacing; retry_after_max_s bounds the longest honored wait (default 60 seconds for third-party gateways, 86400 for preset: codex). For aggregating or proxy gateways that may wrap upstream failures as HTTP 400, set trust_http_400: false or omit the field so unknown 400s can use the normal retry and fallback path.

If requests remain in connecting and then retry, test the endpoint directly, check proxy settings, and inspect the error panel. Chord applies a connection timeout so one unavailable key or gateway does not wait indefinitely.

A 400 invalid_responses_request or invalid codex request means the endpoint rejected the Responses client contract. Chord does not rotate keys or replay history on the current model for this error; another configured model may still be tried. Check that the provider URL supports Responses and that compat.responses.send_prompt_cache_key is enabled. Inspect request_body in the session LLM dump for prompt_cache_key and client_metadata, and check whether request overrides removed or replaced these fields or session headers.

HTTP LLM dumps include request_headers for selected protocol and session headers after request overrides. Credential values are redacted and unrecognized headers are omitted. Compare these headers with the endpoint’s requirements when the request body looks correct.

An SSE event ends with a blank line. Multiple data: lines within that event are joined with a newline and decoded as one JSON payload. A gateway sending independent JSON messages must put a blank line between them. Chord accepts LF, CRLF, and CR line endings, a leading UTF-8 BOM, and fields with or without the optional space after the colon.

For repeated JSON parse errors or missing events, inspect the gateway’s raw HTTP stream, including blank lines; parsed LLM dumps do not retain the original framing. An MCP result requires a complete SSE event. If it is interrupted or invalid and the call reports outcome unknown, check the external service before retrying.

prompt_cache_options is not supported on this model

Section titled “prompt_cache_options is not supported on this model”

Chord does not send explicit prompt-cache fields by default. If you enabled the explicit prompt-cache switches on a GPT-5.6-or-later Responses model and the endpoint does not implement them, it rejects prompt_cache_options or prompt_cache_breakpoint and fails the request. Set send_prompt_cache_breakpoint: false to drop the markers and the top-level field together, or send_prompt_cache_options: false to drop only the top-level field while keeping the markers. The endpoint’s automatic (implicit) caching still applies. See the compat.responses.* rows in Provider field reference.

DeepSeek / OpenAI-compatible thinking-mode 400s

Section titled “DeepSeek / OpenAI-compatible thinking-mode 400s”

If you use a chat-completions provider such as DeepSeek and see errors like:

  • The reasoning_content in the thinking mode must be passed back to the API.
  • Invalid assistant message: content or tool_calls must be set

this usually means the provider requires thinking/reasoning content from the previous tool round to be included again in the follow-up request, with a strict assistant message shape. If the same error keeps repeating, keep the corresponding session dump / trace for diagnosis.

Enable compat.reasoning_continuity.mode: openai_visible on the affected model or provider. This option replays assistant reasoning_content and lets Chord map portable visible reasoning from other wire families into reasoning_content; add any provider-specific thinking flags through compat.request_overrides.body.

For a third-party OpenAI-compatible gateway, Chord keeps using the configured endpoint. It never redirects a request to DeepSeek’s official /beta endpoint or assumes that the gateway implements Chat Prefix Completion. When a reasoning response is truncated before visible text, Chord makes one bounded, request-only replay attempt with the accumulated reasoning_content on that same endpoint, if openai_visible is enabled and the model is unchanged. If the gateway rejects that message shape, Chord removes the temporary replay and continues with the ordinary recovery prompt. This is best effort; for gateways that do not consume reasoning replay, raise the model’s output limit or split the task into smaller requests.

For GLM Preserved Thinking, that body override must include thinking.type: enabled and thinking.clear_thinking: false, plus reasoning_continuity.reasoning_replay: all so Chord keeps completed-turn reasoning in the replayed history. DeepSeek Chat and Messages routes replay the complete reasoning_content history automatically, because DeepSeek returns a 400 when a request carries tools without it. Which model IDs Chord treats as DeepSeek is listed in DeepSeek thinking and history replay; a third-party route whose model ID matches but serves another backend opts out with reasoning_continuity.contract: none, and a route whose name Chord does not recognize opts in with reasoning_continuity.contract: deepseek. In both cases, replayed reasoning_content must remain complete, unchanged, and in order.

Anthropic also binds each thinking block to the conversation prefix that produced it, so a history rewrite (context compaction, session restore) can make the API reject an otherwise intact block with Invalid \signature` in `thinking` block. The block is bound to a different conversation.` Chord recognizes that rejection and retries once with the thinking blocks dropped, so the turn normally continues without manual intervention; the retry keeps the text and completed tool facts. If the error keeps repeating, export a diagnostics bundle and include the session ID in your report.

Codex WebSocket 400 “No tool call found for function call output”

Section titled “Codex WebSocket 400 “No tool call found for function call output””

Chord normally recovers from this WebSocket conversation-state mismatch automatically by retrying with the full local conversation. If the error repeats, export a diagnostics bundle and include the session ID in your report.

A Responses stream ends before a tool request finishes

Section titled “A Responses stream ends before a tool request finishes”

Chord skips unfinished write requests even when their partial arguments look valid. Completed calls can still run, so check their results before retrying. If this happens repeatedly, check the endpoint’s output limit and streaming reliability, and include a diagnostics bundle in your report. A conflicting Responses tool call identity error means the endpoint assigned different calls to the same stream slot; use an endpoint that sends distinct call identities and output indexes.

Cache R percentage is much lower than expected

Section titled “Cache R percentage is much lower than expected”

Cache R is cache-read tokens divided by the full input side (uncached + cache-read + cache-write). Output tokens do not dilute it. A long shared prefix does not guarantee a cache hit: it must end at a cache boundary the server can look up.

Check these factors first:

  • Cache boundaries: GPT-5.6 and later Responses models cache at message boundaries. When explicit breakpoints are enabled, Chord adds markers to eligible durable text messages and tool results. When a transient suffix follows explicit markers, only those markers receive cache writes, avoiding one-use reminders. Earlier models retain their implicit caching rules. Inspect prompt_cache_options and prompt_cache_breakpoint in the LLM dump’s request_body, including whether the endpoint or request overrides preserve these fields.
  • Request changes: model, tool definitions and ordering, system instructions, reasoning effort, verbosity, and output format can change the server-rendered prefix. Request-time trimming or durable compaction can also reduce reuse.
  • Cache identity and lifetime: check that prompt_cache_key stays stable and whether the endpoint, credentials, or model changed. Codex / ChatGPT also uses session headers for cache affinity; check that each client’s session-id, thread-id, and x-client-request-id agree with each other and with prompt_cache_key when sent. Idle time, server routing changes, and cache eviction can all cause misses. The turn ID and start time in client_metadata stay stable within one user turn.
  • Usage semantics: a compatible gateway may report usage with semantics different from its endpoint protocol, causing cache tokens to be counted twice. Check raw responses as described below before treating a low percentage as a server fault.

For messages providers, Chord treats input_tokens as uncached input with separate cache buckets. For chat-completions / responses, the input total already includes cache hits. If a gateway’s messages response instead reports full input in input_tokens and its cached subset in cache_read_input_tokens, the displayed percentage can be roughly halved.

Inspect raw usage in the session LLM dump and check the gateway’s usage documentation. Only after confirming that definition, set compat.usage.input_includes_cache_read: true on the provider (see Configuration). Comparing field sizes alone cannot establish their semantics. Existing usage records are not recalculated after a configuration change; only new requests use the adjusted definition.

A suspected_provider_miss diagnostic is tentative: local message estimates cannot establish identical server rendering, routing, or cache lifetime. Protocols without an explicit boundary before transient input compare the full request, so client-side suffix changes remain visible.

Check first:

  • whether the MCP URL is reachable
  • whether the config name is correct
  • whether local mode is simply still initializing MCP asynchronously

A brief gray pending state after startup can be normal. Run chord doctor mcp <server> for offline checks, then add --connect to test the connection and complete tool catalog. The connection check can refresh or durably confirm shared credentials; it does not open a browser or call tools.

  • Login required: run chord mcp login <server> on the host. For a private server, add --agent <definition>. With static authentication, check the referenced header environment variables instead.
  • Credentials saved, verification failed: the login is retained. Inspect the reported initialize or tools-list stage; do not repeatedly authorize to solve a network or catalog error.
  • Refresh blocked: correct the client ID, issuer, authentication method, or secret environment variable, then explicitly retry login or reconnect. Automatic requests do not repeatedly retry the same blocked refresh.
  • Refresh outcome unknown: a disconnected token exchange may already have invalidated the previous refresh token. Sign in again; do not assume the old token is reusable.
  • Missing scope: sign in again to request the additional access. A failure for one tool does not automatically disable other tools or grant them permission.
  • Callback unavailable: port 41937 may be occupied by another authorization. Client metadata requires that fixed port. For SSH, establish a matching loopback port forward before login; --no-browser still needs the callback listener.
  • Network policy or direct-connect failure: authorization servers must be public HTTPS endpoints. OAuth control requests ignore environment proxies, so confirm the host can reach the server directly even if ordinary MCP requests work through a proxy. Private-network authorization servers are unsupported. The connection report distinguishes network policy, TLS, and protocol failures; it also indicates direct OAuth connections and whether proxy environment variables are present.
  • Credential file permission error: check ownership and user-only access under <state-dir>/mcp/oauth/; Chord does not silently loosen existing permissions or replace damaged credential files. Keep a copy for diagnosis before repairing the files.

Login, logout, and doctor --connect do not change a manual server’s enablement. Enable it separately when needed. An authentication error from a business tool is returned to that call; Chord does not silently replay it. See MCP sign-in.

A failed MCP card does not always mean the server refused the operation. When Chord cannot obtain a matching, trustworthy receipt for a request that may already have been sent, the tool result says the outcome is unknown and asks the model to verify the external state before retrying.

Before resending, check:

  • the tool result text: a failure that explicitly rules out sending is safe from the delivery angle; an outcome-unknown note is not
  • the server’s own records or audit log for the operation’s business key; a gateway error or a disconnect can arrive after the server already committed the change
  • whether the turn was cancelled, replaced, or the session ended while the call was running: a cancelled card can still carry an unknown outcome
  • connection diagnostics with chord doctor mcp <server> --connect prove connectivity only, not whether the business call committed

A server-reported error (isError or a JSON-RPC error) means the server reported failure; it does not guarantee that partial side effects were rolled back. An admitted call is never reported as “never started”, and Chord never resends an unknown call automatically. After restoring a session, a call with a started record but no saved result is treated the same way.

LSP / MCP rows turn gray after the session is idle

Section titled “LSP / MCP rows turn gray after the session is idle”

If the right-side environment panel shows LSP or MCP rows in gray after the agent has been idle for a while, that does not necessarily mean the integration failed.

Chord can unload idle LSP and MCP runtime resources to reduce background cost. In that state:

  • the row is shown in a dim gray idle state instead of an error color;
  • this means the resource was intentionally unloaded while the session was idle;
  • on the next real request / busy cycle, Chord restores the runtime dependency before rebuilding the request surface.

Treat it as a problem only when the row stays red, keeps showing a real connection/configuration error, or the next request fails to restore it.

For Go edits, Chord can start the configured language server while apply_patch, edit, or write arguments are still streaming, once a complete target path and its permissions are known. This overlaps startup with generation of the file content. It only prepares the server; diagnostics still follow the actual write. Read-only work does not trigger this startup, and calls requiring approval or synchronous hooks wait for normal execution.

If you configured LSP but do not see diagnostics after writing files:

  • check whether the corresponding language server is installed locally
  • check whether the lsp config format is correct
  • confirm the target file type matches file_types
  • check whether diagnostics.enabled: false turned off post-tool diagnostics
  • if the tool result carries LSP diagnostics unavailable for this edit (<server>[: <detail>]); do not treat this edit as verified., check the detail or log for startup, connection or synchronization failures, or an exhausted wait budget. Startup and exit notes appear once per server and workspace per session, and wait timeouts once per workspace. A server that is still starting is named on every edit until ready; Chord synchronizes the content after the required servers become ready.
  • diagnostics for the written version can reach the next request during a 15-second follow-up window after the wait or background synchronization completes, while the file is unchanged and the same server has not synchronized another file. TypeScript and other servers that omit document versions cannot provide these follow-ups. A timeout alone does not verify the edit; use a build or check command when verification is needed and no current result arrives.
  • when one tool call edits several files, files whose diagnostics could not be obtained are listed in the Diagnostics: block as <paths>: diagnostics unavailable (<reason>). Files sharing the same reason share one line, and the file list is dropped when every covered file shares the outcome. Cached diagnostics keep a per-file <path> header under showing last known diagnostics:. Single-file results use the session note above.

When a file notification fails, Chord excludes that server from verification and still waits for owners whose synchronization succeeded. If all owners fail, it skips the wait. A confirmed transport disconnect removes the affected instance and its orphaned diagnostics; the next write restarts it. Cancellation or a rejected protocol request alone does not mark the server disconnected.

For Go, No packages found for open file may be a consequence of package loading failure. Check the LSP log before changing module paths. If it reports too many open files and lsp.gopls.options.gopls.fileWatcher is set, remove it so gopls uses its default off, then restart the affected session. On macOS, watching a large workspace with fsnotify can exhaust file descriptors, and poll also walks every workspace directory. File editing can still succeed while LSP diagnostics are unavailable.

For Python specifically:

  • Small files use diagnostics.python.semantic_backend (usually lsp.pyright). Make sure diagnostics.python.semantic_backend.server matches the server key under lsp.
  • Large Python files use Ruff quick diagnostics when ruff is on PATH.
  • If a large Python file reports diagnostics skipped because Ruff is unavailable, install Ruff or set diagnostics.python.large_file.run_semantic_when_quick_unavailable: true to force Pyright on large files too.
  • Ruff quick diagnostics do not update the LSP sidebar; they appear only in edit, apply_patch, or write tool results and clearly note that full Python semantic diagnostics were skipped.

Recommended Python skeleton:

lsp:
pyright:
command: pyright-langserver
args: ["--stdio"]
file_types: [".py", ".pyi"]
diagnostics:
python:
quick_backend:
type: command
command: ruff

For the full recommended config, see Configuration: Post-tool diagnostics.

If --continue or --resume does not appear to work as expected:

  • confirm the current directory belongs to the same project as the original session
  • try explicitly using --resume <session-id>
  • check whether restore is only slow rather than actually lost

Chord automatically repairs incomplete turns caused by an interrupted process before resuming. If restored model/provider state or conversation order looks wrong, export a diagnostics bundle from a current build and include the session ID.

For a tool whose result was never saved, the repaired card shows one of two markers:

  • Not started: the tool had not begun executing, so no side effect could have happened. Re-check the preconditions and retry if appropriate.
  • Result unknown: the tool had already started, so its side effects may be partially or fully applied. Verify the current file or remote state before retrying.

Chord writes the tool-call message to disk before running the tool, so an interruption cannot leave side effects that Chord does not know were intended. If the session directory becomes unwritable (for example, the disk is full), Chord pauses tool execution to avoid unrecoverable repeated side effects, shows a status card with the cause, and resumes tools automatically once writing succeeds again.

A session takeover is still waiting or cannot finish

Section titled “A session takeover is still waiting or cannot finish”

Query the transfer with chord takeover status --session <session-id> --transfer-id <transfer-id> --json. A timeout only stops waiting; the source keeps its lock and continues the transfer. The reported blockers identify requests, tools, jobs, or decisions that still need to finish. A watch process or a tool waiting for input can keep the transfer open indefinitely. Answer its pending decision or use the existing stop controls if you want to cancel that work.

If the status is save_failed, correct the reported storage problem, then run chord takeover retry-save --session <session-id> --transfer-id <transfer-id> --json. This retries saving under the same transfer ID. Do not start a second transfer: the source stays frozen and retains the session lock until saving succeeds. A recoverable_action of manual-recovery means a write or writer closure left an unknown persistence outcome and cannot be retried safely. Check storage and session records; if necessary, explicitly stop the source, resume normally, and verify its history. Do not treat this as a successful transfer.

If the source has released the session but the target cannot restore it, use chord --resume <session-id> from the same project. The session remains paused until an explicit continue or new request. Queued inputs stay with the conversation that received them; continuing the main conversation does not automatically start every delegated task.

Check that both endpoints run as the same OS user in the same workspace, and that the source is a TUI or gateway-managed headless process. An idle target must have no queued input or unsent drafts. transfer_busy means a transfer is already preparing or accepted; query its existing ID instead. Windows does not support local session takeover.

A delegated SubAgent appears stuck or an escalate card keeps running

Section titled “A delegated SubAgent appears stuck or an escalate card keeps running”

Two failure modes can make a delegated SubAgent look stuck; Chord recovers both automatically:

If MODEL or Pool is empty after resuming and focusing a SubAgent, Chord first uses model refs stored in the task, recovery snapshot, and usage ledger. When a record has no model data, it resolves the latest Agent configuration, so task or meta files do not need manual editing.

On restore, the durable task_id is the stable identity of delegated work. Agent IDs such as explorer-4 and explorer-6 are successive runtime instances of that task. Historical instance transcripts are merged by task, while the sidebar and focus router expose only the task’s canonical latest instance. Do not treat an older agent_id as a separate task or copy/delete instance files to alter restore behavior.

If the TUI becomes unresponsive after switching to a large SubAgent transcript or pressing Enter to continue from a parked SubAgent, Chord confines the switch to a bounded transcript window and keeps loading the rest in the background. Agents share a workspace skill catalog, but MainAgent and each SubAgent apply their own latest permissions and keep invoked state separate.

Process stderr writes directly to the rotating log file, so a runtime fatal writes its complete stack and exits instead of appearing as a permanent freeze where every key, including raw-mode Ctrl+C, stops working. If the TUI is stuck in this state, terminate it from another terminal and run reset in the original terminal before exporting diagnostics.

  • When a parked SubAgent resumes, queued input wakes it; if the worker stays running without creating a turn, Chord retries the wake once.
  • If the worker still cannot start, or its provider/model retries end in a terminal error, Chord marks the task failed, records a risk_alert, and wakes the owner/MainAgent to retry, reassign, or report the blocker. It does not fabricate a successful complete result.

An escalate request is a local coordination event, not a long-running network operation. If a completed card still looks pending after resume, Chord repairs it when the adjacent messages have the same tool_call_id; unmatched orphan results are discarded.

If a resumed session is still stuck:

  1. restart with --resume <session-id> using the current Chord version;
  2. use the stable task_id, not the previous runtime agent_id, when retrying or targeting the delegated task;
  3. do not manually edit agents/*.jsonl, subagents/tasks.json, or mailbox files;
  4. with log_level: debug, inspect chord.log for startup watchdog retrying wake, SubAgent failed, or removed orphan tool messages.

The normal post-response watchdog may ask a live worker to call complete or escalate. A worker that cannot recover is instead closed as failed and routed back to its owner; failure is never treated as successful completion.

TUI cards show strange colors or broken layout when viewing logs / dumps / shell output

Section titled “TUI cards show strange colors or broken layout when viewing logs / dumps / shell output”

If a tool card, local shell result, question dialog, or confirmation summary shows unexpected colors, background leaks, or broken wrapping while viewing diagnostic dumps or raw command output:

  • retry the same read, shell, web_fetch, or local shell action
  • if you still see corruption, save the original file/output and a screenshot together

Chord sanitizes assistant/thinking streaming replies, tool results, local shell output, status/error cards, and tool-request previews such as the apply_patch patch text before rendering them as terminal-safe plain text. Control characters and ANSI escapes such as \x1b[1;1H (a cursor-position command) render as literals instead of corrupting the card layout or its background. A raw carriage return embedded in a patch preview is treated the same way: CRLF still displays as a normal line break, while a standalone CR shows as the literal \r, so the preview cannot reflow mid-line and truncate or miscolor the card background or its left edge. If the same content consistently breaks layout, attach the original text and a screenshot so the rendering case can be reproduced.

Colors look wrong when running over SSH or on a remote host

Section titled “Colors look wrong when running over SSH or on a remote host”

If Chord renders with odd colors — for example the splash logo’s accent turns salmon instead of amber, or the context-usage bar shows pink instead of a blue gradient — the terminal’s color depth has been downgraded to the 16-color ANSI palette.

Chord’s dark theme is defined with 256-color indices, and color support is detected automatically from the TERM and COLORTERM environment variables. When TERM does not advertise 256 colors (a plain xterm value is a common culprit on SSH hosts) and COLORTERM is unset, every 256-index color is approximated with the nearest of the 16 base colors, which distorts the theme.

Check what the shell on the remote host reports:

echo "$TERM" && tput colors

If tput colors prints anything other than 256 (or higher), fix the environment on the remote host:

export TERM=xterm-256color

Add the line to ~/.bashrc (or the rc file of your shell) so it survives reconnections, then restart Chord. TERM is normally forwarded by SSH automatically, so a manual export is only needed when something in the chain (a jump host, a web-based terminal, a login shell) resets it.

Optionally also set export COLORTERM=truecolor on the remote host for exact diff-background colors. Note that COLORTERM is not forwarded by SSH, so it must be set on the host where Chord runs. Inside tmux, set set -g default-terminal "tmux-256color" in ~/.tmux.conf instead, since tmux overrides the outer TERM.

Dark block at a card’s right edge or text shifted after an emoji

Section titled “Dark block at a card’s right edge or text shifted after an emoji”

If a dark one-column block shows up at the right edge of a card, or text after an emoji sits slightly to the left of where it belongs, your terminal and Chord disagree about how many columns that emoji occupies. There is no authority for emoji cell widths: the same emoji sequence paints anywhere from one to six columns across popular terminals, and a keycap emoji such as 1️⃣ measures two columns while many terminals draw it in one.

Chord measures text by the Unicode-specified widths and compensates in its renderer: any card row that contains a wide glyph is repainted through an erase-to-end-of-line sequence, so the card background always reaches the true end of the line even when the terminal advanced the glyph by fewer columns.

Some residue is known and not solvable at the application level:

  • text after a mis-measured emoji can sit shifted within its line;
  • on terminals that paint an emoji wider than Chord measured, a column of the row can hold stale content until the next redraw of that row;
  • on terminals that fill erased regions with the default background instead of the active one, erased tails render in the default background.

All of these are display-only: session content, scrollback text, and copies are unaffected. To check how closely your terminal follows the width specification, run ucs-detect. When reporting such an artifact, attach a screenshot plus your terminal’s name and version.

Output-triggered TUI render panic / process killed

Section titled “Output-triggered TUI render panic / process killed”

If the outer launcher only shows:

Error: program was killed: program experienced a panic

and the session must be resumed with --resume, first inspect the end of ~/.local/state/chord/logs/chord.log for the Go panic stack. main.jsonl usually does not contain this panic text because the failure happened in the TUI render path, not as a persisted conversation message.

If the stack contains these frames, treat it as a TUI markdown/ANSI rendering issue first instead of blaming the model or the last tool result directly:

github.com/charmbracelet/x/ansi.(*Parser).Advance
charm.land/lipgloss/v2.(*WrapWriter).Write
charm.land/glamour/v2/ansi.(*HeadingElement).Finish
github.com/keakon/chord/internal/tui.renderMarkdownContent

When checking dumps, note:

  • If the last shell/tool result before the crash was already written to main.jsonl, that tool output was usually not lost.
  • If Chord was waiting on an LLM SSE stream at the time of the crash, the corresponding dumps/llm/*.json may contain only request_body, partial sse_chunks, and reading SSE stream: context canceled. That means the LLM response was dumped only up to the interruption, with no complete final text.
  • context canceled is usually a consequence of process shutdown, not necessarily the root cause.

Attach the panic stack, diagnostics bundle, terminal name/version, and the content being rendered to the issue report.

Screen corruption after switching tabs or refocusing the terminal

Section titled “Screen corruption after switching tabs or refocusing the terminal”

If the TUI occasionally shows stale rows, horizontal line artifacts, or partially broken tool cards right after switching tabs or returning focus to the terminal window:

  • if the screen is already corrupted, lightly resizing the terminal or switching away and back again can force a full redraw
  • if it still reproduces, capture a diagnostics bundle and a screenshot together

If you see corruption right after focus restore while the UI is streaming output, capture a diagnostics bundle plus a screenshot so maintainers can compare Chord’s rendered frame with the terminal’s visible output.

Note: fragments like ;250m pyright during a corruption episode are usually not LSP text but the tail of a truncated ANSI/OSC control sequence.

Repeated separator lines / stale border artifacts

Section titled “Repeated separator lines / stale border artifacts”

If the main symptom is repeated horizontal lines, duplicated input/status separators, stale card borders, or old sidebar borders:

  1. Take a screenshot before forcing a redraw. Include the full terminal window, especially the input area, status bar, and right sidebar.
  2. Export a diagnostics bundle (Ctrl+G) immediately, before resizing the terminal: the bundle captures the frame Chord most recently rendered, so it lets maintainers tell a Chord-drawn duplicate from a stale terminal artifact.
  3. Attach both to your report, plus your terminal emulator name and version.

Two quick local observations also help narrow it down:

  • If the extra line disappears when the terminal is made one or two columns narrower, mention that; it points at right-edge wrap behavior.
  • If the artifact appears right after image preview, paste image, or diagnostics export, mention that too.

Bottom transcript rows are unreachable in long sessions

Section titled “Bottom transcript rows are unreachable in long sessions”

If the last transcript rows appear clipped, the final card seems to touch the input separator, or scrolling to the bottom still leaves part of the latest conversation hidden:

  • pay special attention to whether the issue starts after long-running background jobs or durable status updates in a long session
  • if it still reproduces, capture a screenshot and logs so the transcript state can be compared with the rendered bottom rows

A file-edit tool warns that the file changed since it was observed

Section titled “A file-edit tool warns that the file changed since it was observed”

This warning means the file changed after the agent last read it. Chord validates edits against the current contents; write and delete may also create a backup before continuing.

Common causes:

  • the file was modified by another process (editor/formatter) between read and edit/apply_patch;
  • another agent or Chord process changed the file;
  • the file changed during a formatter, generator, or build step.

Re-run read before retrying. When Chord manages to create a backup, the tool result names its path under the current session directory together with the source file it snapshots, and the model and the user see the same text. A backup is best effort: when it fails the edit still proceeds, nothing claims a backup exists, and only the local log records why. See Edit tools for edit and apply_patch matching behavior.

apply_patch matches hunks line-by-line: exact context passes first, then a separate punctuation/whitespace-tolerant step that is applied only when it lands in exactly one place; a tolerant match hitting several positions is rejected with the ambiguous lines named rather than silently taking the first one. Repeated blocks still need enough nearby context to make the intended location clear.

If you see this:

  • re-run read on the file and rebuild the patch from the latest content;
  • re-copy the target block from the latest read output and make sure context/removal lines match the current indentation; if the hunk came from old numbered output, remove any copied line-number prefix first;
  • when the same block repeats in the file, add nearby unchanged lines to the @@ hunk, use an @@ header anchor, or pin a tail edit with *** End of File, so the intended occurrence is unambiguous;
  • split a broad patch into smaller envelopes or smaller hunks;
  • do not run external apply_patch through shell; use Chord’s native apply_patch tool so permissions, stale tracking, diffs, LSP, and rollback stay connected.

Delivered files cannot be previewed or opened

Section titled “Delivered files cannot be previewed or opened”

When files delivered via the present tool cannot be previewed in the TUI or opened in external applications:

  • Declared version unavailable: the session artifact is missing or its content differs from the delivered version. Restore the original bytes at the recorded path, with the declared size and SHA-256 digest. A same-named file with different content will still fail validation; importing session metadata alone does not restore the artifact.
  • File changed / content version unverified: workspace previews show the current file. Files larger than 8 MiB are checked by size and modification time and always carry an unverified-content notice, even when those values match. Press r to reload, or inspect the complete file in an external application.
  • Text or Markdown limit reached: Markdown rendering accepts up to 128 KiB; press m to view source. Text preview loads up to 1 MiB and 20,000 source lines; use an external application for the complete file. Copying with y includes only loaded source. PDF and non-UTF-8 files require an external application.
  • Open with unavailable: Linux requires gio to enumerate installed applications; when only xdg-open is installed, only the default application can be opened. In SSH or headless sessions without a graphical display, launching desktop applications is disabled; press p to copy the file path.
  • System request still processing: wait for the external-open request to finish before trying again. Closing the viewer leaves applications already handed to the system running.
  • Delivery outcome unknown: session writing or synchronization failed. Check disk space and session-directory access, then restore the session to inspect saved results before deciding whether another declaration is needed. Avoid repeating the declaration while its result is unknown.

If scrolling, streaming output, or large message rendering feels noticeably slow:

  • reduce the current session context size (/compact, or a new session for unrelated work)
  • compare behavior in different terminals

See Performance for how rendering and streaming are optimized and how to capture a CPU profile for a bug report.

Compaction not triggering / triggering too often

Section titled “Compaction not triggering / triggering too often”

Symptom: context usage is high but compaction never runs; or the opposite: frequent compaction disrupts your workflow.

What to check:

  1. Verify context.compaction.threshold is set and greater than 0 (0 disables automatic compaction).
  2. Check the Context percentage in the TUI footer or info panel. It uses the fixed compaction budget after subtracting reserved headroom; the model’s maximum output or independent input cap may make this baseline smaller than the total window (see Context management: Compaction).
  3. If context.compaction.reserved is set, compaction triggers at a lower absolute token count because the reserve is subtracted before applying threshold; if compaction is too frequent, check whether reserved is too large.
  4. If your gateway returns missing or zero usage, enable log_level: debug and look for estimated_input_tokens and effective_input_tokens in automatic-compaction logs.

Note: loop mode changes neither automatic compaction nor request-level context reduction; both stay enabled.

Symptom: the model seems to “forget” earlier tool output, but the session file on disk still contains it.

What to check:

  1. This is normal behavior for context reduction: stale tool output is trimmed from each LLM request prompt, but never modifies session files on disk.
  2. If you frequently need to revisit earlier read/search results, raise read_like_age_turns and read_like_output_bytes.
  3. If build/test logs remain important context, raise shell_success_bytes.
  4. For more conservative trimming behavior, raise all *_age_turns and *_bytes values.

See Context management: Reduction.

Requests rejected: “context length” / “input too large”

Section titled “Requests rejected: “context length” / “input too large””

Symptom: the provider returns an error like “context length exceeded” or “input too large”.

What to check:

  1. Verify that limit.input and limit.context are correctly configured for your model. If the provider publishes a separate input cap, you must also configure limit.input.
  2. Check if context.compaction.threshold is too high, causing automatic compaction to fire too late.
  3. Increase context.compaction.reserved to trigger compaction earlier, avoiding rejected requests.
  4. If this happens frequently, use /compact to manually compact immediately, or lower threshold.
  5. With log_level: debug, search the logs for oversize to confirm whether oversize recovery (compact then retry) was triggered. If automatic compaction is disabled, Chord stops and reports that all attempted candidate models exceeded the current context instead of retrying indefinitely.

A background job’s process is still running but job_list does not show it

Section titled “A background job’s process is still running but job_list does not show it”

Symptom: ps shows a process started by a job command, but job_list reports no active jobs.

What to check:

  1. The job may have finished. job_list lists only running and stopping jobs by default; pass include_finished: true to see retained finished ones, or read the job’s completion card.
  2. The process may have left the job’s process group. A job owns the process group its command starts, so a child that stays in that group keeps the job active; a process that calls setsid or setpgid (a daemonizing tool, or a wrapper that detaches) is outside the job and no longer subject to its deadline, job_kill, or session cleanup. Stop it directly.
  3. Plain command & and nohup command & stay in the group, so they do not escape on their own; only an explicit detach from the process group does. Chord does not scan the process tree for escaped processes.
  4. The job may have stopped without being able to signal the group. Once its command has exited, Chord signals the group only while a member it recorded at that moment is still in that group; a member that left the group on purpose no longer counts. A stop without that evidence is reported as an unconfirmed teardown and the processes it left behind keep running. Look for no member witness or no recorded member is still in the group in the log, and stop those processes directly.

Check logs first when you encounter:

  • provider request failures where the terminal only shows a summarized error
  • context compaction not triggering / context limit issues
  • MCP / LSP initialization errors
  • hook execution results that differ from expectations
  • incomplete headless integration events

Default logs directory: ${XDG_STATE_HOME:-~/.local/state}/chord/logs/. The current log file is chord.log; rotated files are chord.log.1 and chord.log.2.

Override with --logs-dir <path> or CHORD_LOGS_DIR=<path>. To reproduce and collect logs quickly:

chord --logs-dir ./chord-logs

When auth.yaml contains hundreds or thousands of OpenAI / ChatGPT OAuth accounts, Chord loads credential metadata in the background. Missing metadata alone should not block startup.

  • Personal Plus/Pro accounts may carry only user_id and no chatgpt_account_id. They can still be used for ordinary requests, but Chord omits ChatGPT-Account-ID and skips account-id-dependent Codex usage / rate-limit polling for them.
  • account_user_id mismatch or account_id mismatch logs mean metadata explicitly configured in auth.yaml conflicts with what the token itself exposes. Fix or remove that credential.

When manually converting Codex/sub2api exports, keep any available email, account_id, and account_user_id. Use chord doctor models for deliberate account diagnostics.

Press Ctrl+G in the TUI to export a diagnostic ZIP. The completion notification shows its path. Log scanning, heap sampling, and ZIP writing run in the background; pressing the shortcut again while an export is running does not start another export.

The bundle’s heap.pprof contains Go allocation stacks and sampled counts, without object contents. With Go installed, extract the bundle and run:

go tool pprof -top heap.pprof

metadata.txt records the heap sampling time, sampling rate, and Go memory statistics before and after sampling. tui-dump.txt contains the UI and session-payload snapshot taken when you pressed the shortcut. These snapshots have different timestamps. A normal export does not force garbage collection (GC); heap-profile frees may lag by up to two GC cycles. HeapAlloc also includes garbage awaiting collection, so it is not an exact live-object total.

runtime-log-tail.txt selects the current process by the PID in each log header. It includes up to the latest 240 lines, about 256 KiB, from a scan of at most 16 MiB across the current and rotated logs. metadata.txt reports scan and output limits and read errors. If the bundle has no log file, check those statuses before searching the log directory for earlier records. Project-root paths, home-directory paths, and recognized credentials are redacted in exported content.