DeepSeek-TUI Runbook
Practical debugging and incident response procedures for the DeepSeek-TUI CLI/TUI runtime. Companion to deepseek-tui.
Quick Triage
# Binary + config check
cargo run -- --version
cat ~/.deepseek/config.toml
# Verbose logs
RUST_LOG=deepseek_cli=debug cargo run
RUST_LOG=deepseek_cli::client=debug cargo run # HTTP retries/reconnects
# Capture current state
ls ~/.deepseek/sessions
ls ~/.deepseek/sessions/checkpoints
ls ~/.deepseek/tasks
Incident Procedures
Turn Hangs / Stream Stops
Symptoms: TUI stuck in loading state, partial assistant output with no completion.
- Inspect retry/health logs (
deepseek_cli::client) - Verify endpoint connectivity:
curl -sS https://api.deepseek.com/v1/models \ -H "Authorization: Bearer $DEEPSEEK_API_KEY" - Check for local sandbox/permission deadlock in tool output
Actions:
Ctrl+B→ background or cancel running foreground shellexec_shell_cancel <task_id>to cancel background shell tasksEscorCtrl+Cto interrupt the current turn- Retry prompt; if still failing, restart TUI
- On restart, verify prior queued/in-flight turn shows
interruptednotrunning
Network Outage / Offline Behavior
- New prompts queue while offline, persisted to
~/.deepseek/sessions/checkpoints/offline_queue.json - View queue:
/queue list - Confirm queue file timestamp updates
Actions:
- Restore connectivity
- Re-send queued entries:
/queue edit <n>+ Enter - Queue file auto-clears when empty
Crash Recovery
- Checkpoint at
~/.deepseek/sessions/checkpoints/latest.json - Startup starts fresh unless
--resume/--continueorCtrl+R
Actions:
- Resume:
deepseek --resume <id>orCtrl+Rin TUI - Inspect
latest.jsonfor schema mismatch/details - If schema newer than binary: upgrade binary or remove stale checkpoint
Persistent State Schema Errors
Affected stores: sessions, runtime thread/turn/item records, tasks.
Actions:
- Confirm binary version and migration expectations
- Backup state directory before editing
- Either: run newer binary, or archive incompatible records and regenerate
MCP / Tool Execution Failures
- Validate
~/.deepseek/mcp.jsonschema and server command paths - Confirm server process starts manually
- Check sandbox denials in TUI history/logs
Actions:
- Retry with required approvals (YOLO only when appropriate)
- Temporarily disable failing MCP server and isolate
- Re-enable after verification:
/mcpdiagnostics
State File Locations
| Path | Purpose |
|---|---|
~/.deepseek/config.toml |
Main config |
~/.deepseek/mcp.json |
MCP server config |
~/.deepseek/sessions/ |
Session history |
~/.deepseek/sessions/checkpoints/ |
Crash checkpoint + offline queue |
~/.deepseek/snapshots/ |
Side-git workspace snapshots |
~/.deepseek/tasks/ |
Durable background task records |
~/.deepseek/audit.log |
Append-only audit log |
Keyboard Shortcuts
Esc/Ctrl+C— interrupt current turnCtrl+B— detach foreground shell (puts it in background task list)Ctrl+R— resume prior session on startup
Related
- deepseek-tui — main entity page
- deepseek-tui-runtime-api — HTTP/SSE API for headless integration
- deepseek-tui-memory — user memory feature