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)Store it in the config:
perspt config --set api_key="your-key"Check config file:
~/.config/perspt/config.toml
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 checkRelax the descent gate:
--rho-gate 0.3Raise the retry allowance:
--rejection-budget 8Check
perspt statusfor gate decisions and denials
High energy despite clean code:
Run tests manually:
uv run pytest -vorcargo testCheck for LSP diagnostics:
ty check .Bound runaway turns:
--max-turns 8 --max-calls-per-turn 4Verify 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 ledger counters, last energy, and gate state
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, checkpoints
may be flagged as degraded in the review modal, with the reasons listed
alongside the flag. The agent keeps working, 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
If the session store itself refuses to open because of a poisoned DuckDB write-ahead log, back it up and quarantine it (the WAL is never deleted):
perspt db repair --db-path <path-to-db> --discard-wal
Getting Help¶
perspt --help
perspt agent --help
perspt chat --help
For more details, see:
CLI Reference - Full CLI reference
Advanced Troubleshooting - Advanced troubleshooting