Session Management Issues
Error: SESSION_ACTIVE
cs start or cs run in a Git repository (or directory) that already has an active session running.
How to fix it:
- If the session is legitimately still running and you want to resume it, use
cs start --resume. - If an agent crashed and left the session “orphaned” (stale), use
cs start --close-staleto automatically end the old one and start a new one. - To just close the active session without starting a new one, run
cs end.
Error: NO_ACTIVE_SESSION
cs log-ai, cs note, or cs end, but CostHQ couldn’t find an active session scoped to your current directory or Git root.
How to fix it:
Start a session first with cs start "Task Name". If you are trying to log to a specific session that isn’t the active one for your current directory, pass the session ID explicitly: cs log-ai ... -s <id>.
Cost and Pricing Issues
Costs are showing as $0.00
Why it happens: You logged AI usage for an unknown model, and CostHQ didn’t know how much to charge for it. How to fix it:- Check if the model is in the built-in pricing table:
cs pricing list. - If it is a cloud API model, set a custom price for it:
cs pricing set <model> <input-price> <output-price>. Future calls will calculate automatically. - If it is a local model running on your GPU (e.g. Ollama, vLLM), register its hourly compute rate:
cs local-models add <provider>/<model> --cost-per-hour <rate>and log its usage using the--durationflag. - Or, pass the exact cost manually when logging:
cs log-ai -p custom -m custom -t 1000 -c 0.05.
CostHQ Proxy isn’t capturing traffic
Why it happens: The CostHQ proxy is running, but your agent or script isn’t routing its API calls through the proxy port. How to fix it: CostHQ proxy runs onhttp://127.0.0.1:3739 by default. You need to tell your tools to use it:
- Set standard environment variables:
export HTTP_PROXY=http://127.0.0.1:3739andexport HTTPS_PROXY=http://127.0.0.1:3739. - If using Node.js, ensure
GLOBAL_AGENT_HTTP_PROXYis set, or configure your specific SDK (likeopenaioranthropic) to use a custombaseURL.
Dashboard and Server Issues
Error: EADDRINUSE: address already in use
- Start CostHQ on a different port:
cs dashboard --port 4000orcs proxy --port 3740. - Or, find and kill the process using the default port (3739 for proxy, 3738 for dashboard). On macOS/Linux:
lsof -i :3739thenkill -9 <PID>.
File Tracking Issues
CostHQ isn’t detecting my file changes
Why it happens: The background file watcher might not be running, or your files are ignored. How to fix it:- Ensure you started the session with
cs startorcs run. The watcher starts automatically in the background. - CostHQ respects
.gitignore. If a file is git-ignored, CostHQ won’t track changes to it. - To check watcher status, run
cs status— it should indicate if the background watcher is active.
Enterprise / Pro License Issues
Error: Audit trail requires an Enterprise license
Why it happens: You tried to run a cs audit command or access an enterprise endpoint without an active Enterprise-tier license.
How to fix it:
Add your license key using cs dashboard (Settings page) or via the environment. Ensure your license plan is enterprise and not pro. You can verify your license status in the dashboard.