Bug
When opening a task, Claude Code fails with:
No conversation found with session ID: d55325cb-edb0-43c5-b199-e45b18417b87
Process exited with code 0
This happens because the conversationId stored in tasks.provider_config becomes stale — Claude Code cleans up old sessions on updates/restarts, but SlayZone keeps the old ID and tries claude --resume {stale-id}.
Affects most tasks after a Claude Code update or after enough time passes.
Root Cause
provider_config["claude-code"].conversationId in SQLite persists a session UUID. Claude Code sessions are ephemeral — they get garbage-collected. SlayZone has no way to know the session is gone until it tries to resume and fails.
The existing handleSessionInvalid recovery (TaskDetailPage.tsx:620) clears the ID and kills the PTY, but:
- The process often exits before the error handler fires
- User loses context with no option to reconnect
Expected Behavior
When SlayZone detects a session ID mismatch (stored ID ≠ actual running session, or stored session no longer exists):
- Detect the mismatch on task open
- Show a clear indicator that the session is stale
- Offer actionable options — e.g. "Start fresh session" / "Pick existing session to link"
- Update
provider_config with the correct session ID so future opens work
Current Behavior
- Task opens → "No conversation found" error → process exits → dead terminal
- User has to manually figure out what happened
- No way to link a task to a different existing session from the UI
Relevant Code
| File |
What |
claude-adapter.ts:39 |
Detects No conversation found in PTY output |
TaskDetailPage.tsx:620 |
handleSessionInvalid — clears stale ID, kills PTY |
Terminal.tsx:769 |
Subscribes to subscribeSessionInvalid |
pty-manager.ts |
subscribeSessionDetected exists for Codex — could extend for Claude |
tasks.provider_config |
JSON column storing conversationId per mode |
Bug
When opening a task, Claude Code fails with:
This happens because the
conversationIdstored intasks.provider_configbecomes stale — Claude Code cleans up old sessions on updates/restarts, but SlayZone keeps the old ID and triesclaude --resume {stale-id}.Affects most tasks after a Claude Code update or after enough time passes.
Root Cause
provider_config["claude-code"].conversationIdin SQLite persists a session UUID. Claude Code sessions are ephemeral — they get garbage-collected. SlayZone has no way to know the session is gone until it tries to resume and fails.The existing
handleSessionInvalidrecovery (TaskDetailPage.tsx:620) clears the ID and kills the PTY, but:Expected Behavior
When SlayZone detects a session ID mismatch (stored ID ≠ actual running session, or stored session no longer exists):
provider_configwith the correct session ID so future opens workCurrent Behavior
Relevant Code
claude-adapter.ts:39No conversation foundin PTY outputTaskDetailPage.tsx:620handleSessionInvalid— clears stale ID, kills PTYTerminal.tsx:769subscribeSessionInvalidpty-manager.tssubscribeSessionDetectedexists for Codex — could extend for Claudetasks.provider_configconversationIdper mode