Skip to main content
Found a problem? This page lists the most common errors and how to fix them.
For more detailed diagnostics, enable debug logging: LOG_LEVEL=debug chatcli

Common Problems

Symptoms: bash: chatcli: command not found or zsh: command not found: chatcli.Cause: The Go binary directory is not in your system’s PATH.Solution:
  1. Open your shell configuration file (~/.bashrc, ~/.zshrc, etc.)
  2. Add the following to the end of the file:
  1. Restart your terminal or run source ~/.zshrc
Symptoms: ChatCLI terminates immediately after starting.Cause: No API key has been configured in the .env file.Solution:
  1. Create or open the .env file in the directory where you run chatcli (or in your HOME)
  2. Add credentials for at least one provider:
  1. Save and run chatcli again
Symptoms: You changed LLM_PROVIDER or another value, but ChatCLI uses the old configuration.Cause: ChatCLI loads configuration at startup.Solution: Use the /reload command within interactive mode to reload variables instantly.
Symptoms: Error “file does not exist” or “path not found”.Solution:
  • Relative Paths — are relative to the directory where you ran chatcli. E.g.: @file ./project/src/main.go
  • Home (~) — works as a shortcut: @file ~/documents/notes.txt
  • Permissions — check with ls -l that you have read permission on the file
Symptoms: The AI presents an action plan but just waits without executing.Cause: This is the expected behavior! Agent Mode requires explicit approval.Solution:
  • Type the command number (e.g., 1) to execute it individually
  • Type a to execute all commands in sequence
  • Use --agent-auto-exec in one-shot mode for automatic execution of safe commands
Symptoms: Even with OLLAMA_ENABLED=true, the provider does not appear available.Solution:
  1. Ollama Server — confirm it is running: ollama serve
  2. Model downloaded — check with ollama list. If empty, download one: ollama pull llama3
  3. Base URL — if not at the default address, set it in the .env:
Symptoms: The AI response stops in the middle of a sentence.Cause: The response token limit was reached.Solution: Increase the MAX_TOKENS for your provider in the .env:
Symptoms: Timeout error or the application hangs waiting for a response.Solution:
  • Use --timeout to set a limit: chatcli -p "question" --timeout 60s
  • Configure MAX_RETRIES and INITIAL_BACKOFF in the .env for automatic retries
  • Consider configuring Provider Fallback for redundancy
/coder mode validates that every write happens inside the project directory. Starting with this release, ChatCLI creates a Session Workspace at $TMPDIR/chatcli-agent-<random>/ that is automatically on the allowlist:
For writes via write or patch, use the absolute path that appears in the system prompt (the $CHATCLI_AGENT_TMPDIR variable is not expanded inside the file argument).Cleanup runs automatically on exit; set CHATCLI_AGENT_KEEP_TMPDIR=true to preserve and inspect.
When the budget cuts an output and shows [full output saved to /tmp/chatcli-agent-XXX/tool-results/...], the path is on the agent’s read allowlist. Just open it with read_file:
Do not re-run the original tool call — the content is already on disk. Details in Tool Result Management.
Two complementary strategies:
  1. @webfetch filters — pass filter, exclude, from_line/to_line to filter before truncation, or save_to_file: true to persist the body to the scratch dir and read slices later with read_file. See Web Tools.
  2. Subagent delegation — delegate_subagent runs the analysis in an isolated context window and returns only the summary. See Subagent Delegation.
You reached the nested-delegation limit (default 2). Common cause: a subagent delegating to another subagent in a loop. Increase carefully:
But consider whether the task wouldn’t fit better in a single delegation with a more explicit prompt about what needs to be done.
The vault (~/.chatcli/vault) is a one-way projection of memory: it syncs in the background about 5 seconds after memory changes (at most 60 seconds under a steady stream of changes), and what you edit there never flows back into memory.
  • /memory vault status shows the directory and the last sync; /memory vault sync syncs now.
  • Kept notes are ones you edited by hand, or files chatcli never wrote: they are never overwritten. /memory vault sync --force regenerates chatcli’s own notes (your edits to them are lost); a file chatcli never wrote is kept even then.
  • Nothing appears at all: check CHATCLI_MEMORY_VAULT (a falsey value stops it; /memory vault sync still writes it on demand) and CHATCLI_MEMORY_VAULT_DIR.

Encrypted data: protect it and recover it

Your sessions, memory and other local data are encrypted at rest by default. Encryption means the key matters: these scenarios cover how not to lose access and how to get it back.
Three rules that prevent almost every loss:
  1. Run /config security recovery-key once and keep the key in a password manager.
  2. Never edit or delete files under ~/.chatcli by hand to “fix” an error, and never delete the chatcli / auth-key item from the OS keychain or the ~/.chatcli/.auth-key* files.
  3. Back up ~/.chatcli like any other data. A backup is only useful together with the recovery key, so keep them apart.
Cause: ChatCLI could not read the key. The error says why, for example a locked macOS keychain in an SSH session, or Linux with secret-tool but no desktop session. /config security shows unavailable with the reason.What happens meanwhile: nothing is lost. Memory stores that cannot be opened are locked read-only so nothing overwrites them, and sessions fail to load instead of loading empty.Fix: unlock the keychain (log in to the desktop, or security unlock-keychain on macOS) and run ChatCLI again. Where there is never a keychain, set CHATCLI_ENCRYPTION_KEY to your recovery key.
The default key lived in the old keychain. Copy ~/.chatcli to the new machine, then:
Everything opens. Then run /config security use-keychain: your data moves to the new machine’s keychain key, and you can remove the variable.With a recovery file instead, a single command does both: /config security recovery-key --restore <file> (it asks for the file’s passphrase).Without a recovery key and without the old keychain, the encrypted stores cannot be recovered. That is the point of encryption. Exports you made earlier (/session export, /memory export) are plaintext and still import.
After the key moved to the keychain, ChatCLI refuses to create a new one in a context that cannot reach the keychain, because a new key would orphan your data. Give that context the key instead:
Do not delete ~/.chatcli/.auth-key.keychain to make the error go away: it is what stops a second key from being created.
Older versions cannot read encrypted stores. With the new version, first write everything back in plaintext:
Then install the older version. Keep CHATCLI_ENCRYPTION_KEY=off if you use the new version again.
export CHATCLI_ENCRYPTION_KEY=off stops encrypting new data. Data already encrypted keeps opening. To also decrypt what exists, run /config security reseal while it is off. To just read one file, use /config security reveal <file> instead: nothing on disk changes.
Once the key is in the keychain, a key file that shows up later is ignored in favor of the keychain key, with a warning. Nothing is overwritten. Remove the stray ~/.chatcli/.auth-key when you have confirmed /config security shows the keychain key.
Encrypted files are authenticated: a changed byte makes the whole file fail to open. ChatCLI never treats it as empty and never overwrites it.
  • Restore that file from a backup.
  • Daily notes are the exception you can edit: a note saved in plaintext by hand still reads, and is encrypted again on the next write.
  • To read or change your data outside ChatCLI, export it first (/session export, /memory export, /context export). To read memory and contexts as notes, open the memory vault (~/.chatcli/vault), kept in plaintext for that purpose.
Cause: the OS keychain already holds a chatcli / auth-key item that is not your key (often left there by an older build or a test run), while your real key is the file ~/.chatcli/.auth-key. ChatCLI never overwrites a keychain key on a guess, so it keeps using the file: your data, credentials and recovery key are not affected.Fix: run /config security use-keychain. It moves the file key into the keychain only after checking that it opens your credential store and your encrypted data (with no credential store, because you never logged in, the encrypted data alone is the proof), keeps the keychain’s previous value as auth-key.previous, and reads the key back before removing the file. The key itself does not change, and the warning stops.
Safe in both directions: the key is the same, only where it is kept changes. Switching to file copies the key from the keychain into ~/.chatcli/.auth-key (mode 0600) and keeps the keychain item; switching back to keychain or auto uses the keychain again. The only thing to keep in mind is that with file the key sits on disk next to the data.
The keychain key belongs to one machine. Set the same CHATCLI_ENCRYPTION_KEY on both (for example your recovery key from the first one), run /config security reseal once on each, and copy or sync ~/.chatcli between them.

Still having problems?

Debug Logs

Run with LOG_LEVEL=debug and check ~/.chatcli/app.log for full error details.

Open an Issue

Include: version (chatcli --version), OS, Go version, steps to reproduce, and relevant logs.