Troubleshooting¶
API Key Issues¶
Symptom: “No API key found” error.
Solutions:
Check env var is exported:
echo $GEMINI_API_KEYVerify spelling:
ANTHROPIC_API_KEY(notANTHROPIC_KEY)Pass explicitly:
perspt chat --api-key "your-key"Check config file:
~/.config/perspt/config.json
Connection Errors¶
Symptom: “Connection refused” or timeouts.
Solutions:
Check internet connectivity
For Ollama: ensure
ollama serveis runningCheck firewall/proxy settings
Try a different provider
Agent Mode Issues¶
Agent stuck in retry loop:
Check tool prerequisites:
which uv,which cargo,which nodeCheck LSP is functioning:
ty check .orcargo checkLower stability threshold:
--stability-threshold 0.5Use
--defer-teststo skip V_log during codingCheck
perspt statusfor escalation details
High energy despite clean code:
Run tests manually:
uv run pytest -vorcargo testCheck for LSP diagnostics:
ty check .Adjust energy weights:
--energy-weights "0.5,0.5,1.0"Verify contract compliance
Plugin not detected:
Ensure required binaries are installed in PATH
Check workspace has expected marker files (
Cargo.toml,pyproject.toml)Run
perspt statusto see active plugins
TUI Rendering Issues¶
Symptom: Garbled output, incorrect colors.
Solutions:
Ensure terminal supports 256 colors:
echo $TERMTry a different terminal emulator
Fallback to simple CLI:
perspt simple-chatCheck for conflicting terminal multiplexer settings
Degraded Verification¶
When tool binaries (ty, cargo, pytest) are missing, the agent enters
degraded verification mode:
V_syn is estimated via heuristic pattern matching (regex-based)
V_log uses
exit 0stubsV_boot skips missing commands
This allows the agent to function, but with lower verification confidence.
To restore full verification, install the required tools:
# Python projects
pip install ty pytest
# Rust projects
rustup component add rust-analyzer
# Node.js projects
npm install -g typescript
Session Recovery¶
If a session is interrupted:
# Check what's in progress
perspt status
# Resume the last session (shows trust context first)
perspt resume --last
# Or abort and start fresh
perspt abort
Getting Help¶
perspt --help
perspt agent --help
perspt chat --help
For more details, see:
CLI Reference — Full CLI reference
Advanced Troubleshooting — Advanced troubleshooting