Cowork/Code: "No conversation found with session ID" on 2nd turn — transcript never persisted to disk (Desktop Linux, embedded CLI 2.1.215)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
On Claude Desktop for Linux (official beta), local agent mode (Cowork/Code tab) fails on the second turn of any multi-turn session with "No conversation found with session ID". The host loop reports the first turn as successful and maps it to a CLI session ID, but that session's transcript is never written to disk anywhere under ~/.config/Claude. When the second turn tries to --resume that session ID, it fails immediately.
This is 100% reproducible, is not caused by switching model/effort/thinking mode between turns (tested holding the model constant — still fails), and is not the app.asar/--add-dir issue reported against the unofficial claude-desktop-debian repackage (that code path isn't involved here — additionalDirectories is undefined in this session, and the path referenced in that other report doesn't even exist on this official install).
What Should Happen?
Turn 2 should resume the session created by turn 1 using the same cli_session_id, and the conversation should continue normally, the same way it does in Chat mode (unaffected) or in the standalone Claude Code CLI outside the Desktop app.
Error Messages/Logs
From ~/.config/Claude/logs/main.log:
2026-07-22 17:42:46 [info] Starting local session local_5fd86918-e209-4d8c-b357-4e4732ab70a3 in /home/admiring-brave-albattani
2026-07-22 17:42:47 [info] Mapping internal session local_5fd86918-e209-4d8c-b357-4e4732ab70a3 to CLI session 12540930-ea0f-4042-b10c-cf521fc9a251
2026-07-22 17:42:50 [info] [Result] Turn succeeded for session local_5fd86918-e209-4d8c-b357-4e4732ab70a3
2026-07-22 17:42:50 [info] [CycleHealth] Healthy cycle: { ..., had_first_response: true, is_resume: false, cli_session_id: '12540930-ea0f-4042-b10c-cf521fc9a251' }
2026-07-22 17:43:01 [warn] [HostLoop] cli.js stderr: No conversation found with session ID: 12540930-ea0f-4042-b10c-cf521fc9a251
2026-07-22 17:43:01 [info] [Result] Turn failed for session local_5fd86918-e209-4d8c-b357-4e4732ab70a3: subtype=error_during_execution, is_error=true
2026-07-22 17:43:01 [info] [Result] Clearing stale cliSessionId 12540930-ea0f-4042-b10c-cf521fc9a251 for session local_5fd86918-e209-4d8c-b357-4e4732ab70a3 — transcript was unresumable (queue-ops only)
2026-07-22 17:43:01 [info] [CycleHealth] Unhealthy cycle: { ..., is_resume: true, cli_session_id: null, unhealthy_reason: 'api_error', error_category: 'session_not_found' }
Manual reproduction outside the Electron host, using the exact CLAUDE_CONFIG_DIR and cwd the host loop used for turn 1:
$ CLAUDE_CONFIG_DIR="$CFG" ~/.config/Claude/claude-code/2.1.215/claude \
--resume 12540930-ea0f-4042-b10c-cf521fc9a251 -p "teste" --verbose --output-format=stream-json
No conversation found with session ID: 12540930-ea0f-4042-b10c-cf521fc9a251
{"type":"result","subtype":"error_during_execution","duration_ms":0,"duration_api_ms":0,"is_error":true,"num_turns":0,"stop_reason":null,"session_id":"12540930-ea0f-4042-b10c-cf521fc9a251","total_cost_usd":0, ... "errors":["No conversation found with session ID: 12540930-ea0f-4042-b10c-cf521fc9a251"]}
Steps to Reproduce
- Install Claude Desktop for Linux (official .deb, apt repo downloads.claude.ai/claude-desktop/apt/stable)
- Open the app, go to the Cowork or Code tab, start a new session
- Send a first message (e.g. "oi") — turn completes successfully, response streams back normally
- Send a second message in the same session, keeping model/effort/thinking settings unchanged
- Turn 2 fails immediately with "No conversation found with session ID: <id from turn 1>"
Independent confirmation (bypasses the GUI/host loop entirely):
- From main.log, note the cli_session_id the host mapped for turn 1 (e.g. from the line "Mapping internal session ... to CLI session <id>") and the CLAUDE_CONFIG_DIR used (visible in the "[HostLoop] sdkOptions after patch" dump)
- Confirm no transcript exists for that session anywhere:
find "$CLAUDE_CONFIG_DIR/projects" -iname "<session_id>" # empty
find ~/.claude/projects -iname "<session_id>" # empty
find ~/.config/Claude -iname "<session_id>" # empty
- Reproduce with the standalone embedded CLI, no Electron involved:
CLAUDE_CONFIG_DIR="<config_dir_from_log>" ~/.config/Claude/claude-code/<version>/claude \
--resume <session_id> -p "test" --verbose --output-format=stream-json
→ same "No conversation found" error, confirming the transcript genuinely was never written to disk, not a host-loop timing/race issue.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
N/A — no prior Linux Desktop version existed to test.
Claude Code Version
2.1.215 (Claude Code) (embedded/bundled CLI version, found at ~/.config/Claude/claude-code/2.1.215/claude; confirmed via: ~/.config/Claude/claude-code/2.1.215/claude --version)Claude Desktop app version: 1.24012.0 (from main.log: appVersion: '1.24012.0')
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Terminal/Shell: Bash (default shell). Note: this bug does not occur in a terminal session — it occurs within the Claude Desktop Electron GUI app (Cowork/Code tab). Terminal/shell is only relevant for the manual reproduction steps (7–8 in Steps to Reproduce), which were run in a standard bash shell to bypass the Electron host and confirm the transcript truly doesn't exist.
Host loop config dump (from main.log) confirms additionalDirectories: undefined in both turns — ruling out the app.asar/--add-dir bug reported against the unofficial claude-desktop-debian repackage (github.com/aaddrick/claude-desktop-debian/issues/632). That project's electron resources path (/usr/lib/claude-desktop/node_modules/electron/dist/resources/) does not exist on this official install, confirming this is a distinct issue specific to the official build.
This blocks any multi-turn usage of Cowork/Code on Claude Desktop Linux — every session dies after the first message.