claude-code - 💡(How to fix) Fix [Feature Request] Add fallback to local Claude Code session when remote bridge disconnects [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55568Fetched 2026-05-03 04:50:02
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"SyntaxError: JSON Parse error: Unable to parse JSON string\n at <parse> (:0)\n at parse (unknown)\n at vq$ (B:/~BUN/root/src/entrypoints/cli.js:171:10030)\n at _ (B:/~BUN/root/src/entrypoints/cli.js:131:19158)\n at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:173:1422)\n at LUH (B:/~BUN/root/src/entrypoints/cli.js:2825:33624)\n at qW (B:/~BUN/root/src/entrypoints/cli.js:2825:29301)\n at IZH (B:/~BUN/root/src/entrypoints/cli.js:2825:30924)\n at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:18993:1307)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T12:32:28.892Z"}]

Code Example

[{"error":"SyntaxError: JSON Parse error: Unable to parse JSON string\n    at <parse> (:0)\n    at parse (unknown)\n    at vq$ (B:/~BUN/root/src/entrypoints/cli.js:171:10030)\n    at _ (B:/~BUN/root/src/entrypoints/cli.js:131:19158)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:173:1422)\n    at LUH (B:/~BUN/root/src/entrypoints/cli.js:2825:33624)\n    at qW (B:/~BUN/root/src/entrypoints/cli.js:2825:29301)\n    at IZH (B:/~BUN/root/src/entrypoints/cli.js:2825:30924)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:18993:1307)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T12:32:28.892Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Title: Claude Desktop: bridged Remote Control session can't fall back to local when the bridge dies

Summary When a Remote Control session in Claude Desktop loses its bridge (the local claude remote-control server crashes, the machine sleeps, network blip, etc.), the tab shows "Remote Control disconnected — bridged Claude Code process stopped responding mid-turn" and becomes permanently unrecoverable. Reopening the tab, restarting the app, or rebooting the machine doesn't help — the tab keeps trying to reconnect to a server that no longer exists.

The frustrating part The session's full JSONL history is intact on local disk at ~/.claude/projects/<sanitized-cwd>/<session-id>.jsonl. The data isn't lost — only the UI's path to it is. The only way to keep working is to open a separate Claude Desktop window (or terminal) pointing at the original project folder and run /resume <session-id> manually. From the user's point of view this looks like the conversation died.

Repro

Run claude remote-control in a project folder. Connect from Claude Desktop / claude.ai/code. Kill the local claude remote-control process (or let it crash, or close its terminal). The bridged tab shows the disconnect error and never recovers, even after relaunching Claude Desktop or rebooting. Suggested fix When the bridge dies, the bridged tab should offer a one-click "Continue locally" action that reopens the same session in a new local Claude Desktop tab via /resume <session-id> against the original cwd. Everything needed (session ID, original cwd) is already known to the UI at disconnect time, and the JSONL is on disk.

Environment Claude Desktop on Windows 11, claude-code 2.1.121.

Environment Info

  • Platform: win32
  • Terminal: WarpTerminal
  • Version: 2.1.121
  • Feedback ID: c1174111-0eda-46b7-8a93-e57600518015

Errors

[{"error":"SyntaxError: JSON Parse error: Unable to parse JSON string\n    at <parse> (:0)\n    at parse (unknown)\n    at vq$ (B:/~BUN/root/src/entrypoints/cli.js:171:10030)\n    at _ (B:/~BUN/root/src/entrypoints/cli.js:131:19158)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:173:1422)\n    at LUH (B:/~BUN/root/src/entrypoints/cli.js:2825:33624)\n    at qW (B:/~BUN/root/src/entrypoints/cli.js:2825:29301)\n    at IZH (B:/~BUN/root/src/entrypoints/cli.js:2825:30924)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:18993:1307)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-02T12:32:28.892Z"}]

extent analysis

TL;DR

Implement a "Continue locally" action in the bridged tab to reopen the session in a new local Claude Desktop tab via /resume <session-id> when the bridge dies.

Guidance

  • Identify the session ID and original cwd at disconnect time to enable reopening the session locally.
  • Modify the UI to offer a one-click "Continue locally" action when the bridge dies, using the stored session ID and cwd.
  • Verify that the JSONL history is intact on local disk at ~/.claude/projects/<sanitized-cwd>/<session-id>.jsonl to ensure data is not lost.
  • Consider adding error handling for cases where the local JSONL file is missing or corrupted.

Example

// Pseudo-code example of reopening a session locally
const sessionId = getStoredSessionId();
const cwd = getOriginalCwd();
const jsonlPath = `~/.claude/projects/${cwd}/${sessionId}.jsonl`;
// Reopen session in a new local tab using /resume <session-id>
reopenSessionLocally(jsonlPath, sessionId);

Notes

The provided error log suggests a JSON parse error, but it may not be directly related to the issue of the bridged tab not falling back to local when the bridge dies.

Recommendation

Apply workaround: Implement the suggested "Continue locally" action to enable users to reopen the session in a new local tab when the bridge dies, as this provides a clear path to recovery and minimizes data loss.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Feature Request] Add fallback to local Claude Code session when remote bridge disconnects [1 comments, 2 participants]