claude-code - 💡(How to fix) Fix Expose remote session URL/token in status line stdin JSON [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#54981Fetched 2026-05-01 05:49:22
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Claude Code remote/web sessions have a stable URL like https://claude.ai/code/session_01XUTbmXVVNk1zphmMtkfzAE, but this token is not surfaced to status line scripts. The local session_id (a UUID) is unrelated to the remote token, so a status line cannot derive or display the remote URL.

Root Cause

  • Distinguishing remote sessions at a glance (the local UUID looks identical to a non-remote session's ID).
  • Quickly reopening a remote session in the browser.
  • Sharing/linking the active session in chat without copying from the URL bar.

Fix Action

Fix / Workaround

Workaround today

RAW_BUFFERClick to expand / collapse

Summary

Claude Code remote/web sessions have a stable URL like https://claude.ai/code/session_01XUTbmXVVNk1zphmMtkfzAE, but this token is not surfaced to status line scripts. The local session_id (a UUID) is unrelated to the remote token, so a status line cannot derive or display the remote URL.

Request

Add a field — e.g. remote_session.url (and/or remote_session.id) — to the JSON piped to the statusLine.command script. Document it at https://code.claude.com/docs/en/statusline alongside the existing session_id, session_name, etc.

Why this matters

  • Distinguishing remote sessions at a glance (the local UUID looks identical to a non-remote session's ID).
  • Quickly reopening a remote session in the browser.
  • Sharing/linking the active session in chat without copying from the URL bar.

Workaround today

The token is currently readable from ~/.claude/sessions/<pid>.json as bridgeSessionId, but this is undocumented internal state and not safe to depend on.

Environment

  • Claude Code 2.1.123 (macOS, darwin 25.2.0)

extent analysis

TL;DR

Adding a remote_session.url field to the JSON output for the statusLine.command script is likely the most straightforward fix to display the remote session URL.

Guidance

  • The current workaround of reading the bridgeSessionId from ~/.claude/sessions/<pid>.json is not reliable due to its undocumented nature, so a more stable solution is needed.
  • To verify the fix, check the JSON output of the statusLine.command script for the presence of the remote_session.url field after implementing the change.
  • The new field should contain the stable URL of the remote session, allowing for easy identification and sharing of remote sessions.
  • Documenting the new field at https://code.claude.com/docs/en/statusline will help users understand how to utilize this new feature.

Example

No code example is provided as the issue does not contain sufficient technical details about the implementation.

Notes

The solution relies on modifying the JSON output of the statusLine.command script, which may require changes to the Claude Code application itself.

Recommendation

Apply workaround by adding the remote_session.url field to the JSON output, as this directly addresses the issue and provides a clear benefit to users.

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 Expose remote session URL/token in status line stdin JSON [1 comments, 2 participants]