Skip to content
Website ↗

Troubleshooting ​

Identify the stage where the problem occurs. Check the command entry point, daemon connection, model request, and sandbox execution separately. The read-only commands below can also help you collect diagnostics that someone else can verify.

The terminal cannot find Codant ​

After installation, open a fresh terminal and run codant --version. Use Get-Command codant in PowerShell or command -v codant in a Linux shell to find the resolved command. If several copies are installed, confirm the path and version in use. The Linux installer explains how to set PATH. The Windows MSI adds its command entry to the current user's PATH. To run a source build, see Quickstart. Windows MSI user PATH configuration · Linux installer

If the command resolves but the terminal UI fails to open, check that the terminal supports ANSI/VT and provides interactive standard input and output. Use codant --no-animation to skip the startup animation or codant --ascii for ASCII art. Terminal detection in canInteract and display options

The daemon is unreachable or reports a protocol mismatch ​

Use codant ping to check an existing daemon. Inside the terminal UI, /status shows the current connection. If the daemon is down, run codant serve in the foreground to see startup errors, then run codant ping from another terminal. Processes that connect to the same daemon must use the same data root. If you set CODANT_DATA_DIR, confirm that each entry point receives the same value.

If a mismatch appears after an upgrade, confirm that the client and daemon come from the expected installation and check for an older daemon still running. If you need to restart, let active work finish and stop the original daemon normally. Press Ctrl+C for a foreground codant serve or use codant stop for the background process. Start the intended version and check the connection again. Daemon commands and help · Runtime directory and endpoint

Model discovery or testing fails ​

Start with codant model list to see the configuration and credential status visible to the current terminal. If you have no aliases yet, run /model setup in the UI or use codant model discover <provider> to read the catalog of the running service. Discovery and testing use the daemon's configuration and environment. If discovery prints an unexpected configuration path, check the daemon's startup environment and CODANT_CONFIG_FILE.

Run codant model test <alias> for a configured model. Use its output to distinguish authentication errors, timeouts, and individual capability failures. Check the actual model ID returned by the service. After changing credentials or the endpoint, start the daemon with the intended environment and run the fixed-input check again. Model discovery and testing · Capability checks

A write, command, or network request is restricted ​

Use the permissions guide to locate the boundary that applies. Check the current session mode, the original task's permission ceiling, and any pending approvals. Run the read-only diagnostics from the project you are troubleshooting.

sh
codant sandbox status --offline
codant sandbox resources --offline --limit 10

Offline diagnostics read local state with the daemon's runtime state unconfirmed. With a daemon running, use codant sandbox status and codant network status for online results. Investigate tool networking and model provider connectivity separately. If Windows reports that initial sandbox setup is incomplete, follow the prompts to run codant sandbox setup explicitly and respond to the system authorization prompt. Sandbox commands and scope · Online tool network query

The state of a submission or its changes is unclear ​

If acceptance remains unconfirmed after reconnecting, keep the original submission UUID and look it up. Use /ants --submission <UUID> in the terminal UI or codant task show --submission <UUID> from the shell. If you already have the task ID, inspect the task and its retained evidence directly.

sh
codant task show TASK_ID
codant task evidence TASK_ID
codant task changes TASK_ID

Replace TASK_ID with the original task ID. Use /diff for the current workspace diff. After interrupting a task, check retained changes and evidence to see which actions ran. Original submissions and task queries · Terminal receipts

The VS Code sidebar is disconnected ​

Confirm that your local VS Code and the experimental extension meet the extension requirements. Run codant serve --ide locally and keep the terminal open. In the sidebar, click 选择桥记录 (Select bridge record) and select the ide-bridge-UUID.json file printed by that command. After restarting the IDE bridge, select the new record. Keep the bridge record and its credential on your machine. To send messages or manage sessions, open a trusted workspace. In a multi-root workspace, choose the folder that owns the session.

For a custom local client, use the stdio tutorial to check basic daemon behavior before troubleshooting the WebSocket setup. VS Code connection steps

Collect diagnostics you can share ​

Online log commands query a running daemon. Use the offline commands below to read local history. Replace FILE_ID with an entry ID from the list.

sh
codant logs status --offline
codant logs list --kind daemon --limit 10 --offline
codant logs read FILE_ID --offline

logs list supports --kind model|daemon|network and task or request ID filters. An empty page can still have a nextCursor. Keep the original filters when continuing. In a report, include the Codant version, operating system, steps, relevant results, and conditions needed to reproduce the problem. Remove secrets, bridge records, private paths, and project content before sharing. Log queries in runLogsCommand · Output redaction in redactEventText

Guide overview · Diagnose model configuration · Permissions, approvals, and sandboxing