Troubleshooting¶
API Key Issues¶
Symptom: “No API key found” error.
Solutions:
- Check whether the variable is set without printing it:
test -n "$GEMINI_API_KEY" && echo set - Verify 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 running - Check firewall/proxy settings
- Try a different provider
Agent Mode Issues¶
Agent stuck in retry loop:
- Check tool prerequisites:
which uv,which cargo,which node - Check LSP is functioning:
ty check .orcargo check - Relax the descent gate:
--rho-gate 0.3 - Raise the retry allowance:
--rejection-budget 8 - Check
perspt statusfor gate decisions and denials
High energy despite clean code:
- Run tests manually:
uv run pytest -vorcargo test - Check for LSP diagnostics:
ty check . - Bound runaway turns:
--max-turns 8 --max-calls-per-turn 4 - 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 ledger counters, last energy, and gate state
TUI Rendering Issues¶
Symptom: Garbled output, incorrect colors.
Solutions:
- Ensure terminal supports 256 colors:
echo $TERM - Try a different terminal emulator
- Fallback to simple CLI:
perspt simple-chat - Check for conflicting terminal multiplexer settings
Degraded Verification¶
Missing required tools block a hard pass. The runtime records the missing evidence rather than treating it as a clean measurement. Non-required stages may produce advisory findings.
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