[BUG] Remote Control returns HTTP 403 on the in-session `/bridge` path, while `claude remote-control` works on the same machine and account
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?
Bug report: Remote Control returns HTTP 403 on the in-session /bridge path, while claude remote-control works on the same machine and account
Summary
On one Windows machine, every attempt to attach an existing interactive session to Remote Control fails with:
Remote Control failed to connect: Remote Control server rejected the request (HTTP 403) — run /remote-control to retry
This affects /remote-control typed inside a session, the --remote-control startup flag, and remoteControlAtStartup: true. Retrying never helps.
On the very same machine and account, the standalone command claude remote-control --name <name> connects successfully: environment registration returns 200, a session is created, heartbeats return 200, and the session is visible in the mobile app. So credentials, organization, and network are fine. The 403 is specific to the /bridge reattach path.
The problem has persisted since 2026-09-09/10 across client versions 2.1.266 (worked on 2026-09-10), 2.1.269, and 2.1.272, and is still reproducible on 2026-09-19.
Environment
| Item | Value |
|---|---|
| OS | Windows 11 Pro 10.0.26200 |
| Hostname | CHIEN_VOI |
| machine_id (from bridge debug log) | 64d7a1ba-48e6-409c-9cd7-ce748480e541 |
| organization_uuid (from bridge debug log) | e2c95ed2-9a57-4051-ab99-9bdb2d1bc827 |
| Claude Code (VS Code extension binary) | 2.1.272 (anthropic.claude-code-2.1.272-win32-x64) |
| Claude Code (CLI on PATH) | 2.1.269 |
| Auth | OAuth, valid, scope includes user:sessions:claude_code |
| Sandbox | off |
Reproduction
A. Failing path (in-session bridge)
- Open any interactive session, for example in the VS Code extension, working directory
C:\Users\admin\ToolRegIG. - Type
/remote-control(or start with--remote-control "name", or setremoteControlAtStartup: true). - Result: the 403 banner above.
Debug log (--debug-file … --verbose) for this path shows:
[bridge:repl] Reattaching to persisted bridge session cse_…
[code-session] /bridge failed 403: Permission denied
/bridge 403 source=origin
source=origin indicates the origin server rejected the request, not the CDN.
B. Working path (standalone Remote Control), same machine, same minute
cd C:\Users\admin\ToolRegIG
claude remote-control --name RC-probe --debug-file rc_probe.log --verbose
Debug log excerpt (2026-09-18T17:27Z):
[bridge:init] bridgeId=c33ed313-6513-4e8d-9ae3-740aafe9ec2a dir=C:\Users\admin\ToolRegIG machine=CHIEN_VOI
[bridge:api] POST /v1/environments/bridge -> 200 environment_id=env_01XgKrGHwWaXEWS6G6cgwkgB
[bridge:init] Created initial session session_01DC4Zh8GVfBTH3fSBbLijfG
[bridge:work] Starting poll loop spawnMode=same-dir maxSessions=32
[bridge:api] GET .../work/poll -> 200 workId=cse_01DC4Zh8GVfBTH3fSBbLijfG type=session
[bridge:api] POST .../work/cse_01DC4Zh8GVfBTH3fSBbLijfG/ack -> 200
[bridge:session] CCR v2: registered worker epoch=1 attempt=1
[bridge:api] POST .../work/cse_01DC4Zh8GVfBTH3fSBbLijfG/heartbeat -> 200 lease_extended=true state=active
Zero 403s in this log. The session appeared in the Claude mobile app immediately.
C. Reattaching the existing session by ID also fails
claude remote-control --session-id e8cb1e68-b952-45e1-96dd-a2eace213258 --name ToolRegIG-VSCode
Result:
Error: Could not reach the server to look up session e8cb1e68-b952-45e1-96dd-a2eace213258. Check your network or run `claude /login`, then try again.
Network was verified working seconds earlier (path B). The session ID is the local session UUID of the VS Code extension session; it appears the lookup only knows server-issued cse_… IDs, so there is no way to expose an already-running interactive session.
What has been ruled out (measured, not assumed)
claude doctorreports no problems. No managed settings. No API key override.- OAuth token valid and not expired; scope includes
user:sessions:claude_code; organization matches. - Network and CDN: WebSocket handshake to
wss://bridge.claudeusercontent.comreturns 101; a WireGuard split-tunnel VPN made no difference when disabled. - Client version: 2.1.269 and 2.1.272 both fail on path A; 2.1.266 succeeded on path A on 2026-09-10, so the change is server-side or account-state related, not client-side.
- Working directory: sessions started from the home directory and from project directories fail identically on path A.
- Concurrent sessions: with a single session open the 403 persists.
- Trusted devices:
POST /api/auth/trusted_devicesalways returns"reused_existing": false, even while path B is working, so that flag is not diagnostic. Clearing Trusted devices and Active sessions on claude.ai and opening fresh sessions did not fix path A.
Impact
No interactive session on this machine can be attached to Remote Control. Only fresh sessions spawned by claude remote-control are reachable from the phone, so any context built in an interactive or VS Code session cannot be continued remotely. remoteControlAtStartup had to be disabled because every session otherwise shows the 403 banner repeatedly.
Questions
- Why does the
/bridgeendpoint return 403 Permission denied for this machine and account, whilePOST /v1/environments/bridgeon the same machine, account, and token returns 200? - Is there server-side per-machine or per-account state on the
/bridgepath (for example a stale persisted bridge sessioncse_…that the client keeps trying to reattach) that can be reset? - Is there a supported way to attach an already-running interactive session (local session UUID) to Remote Control, given that
--session-idonly resolves server-issued session IDs?
Debug logs for paths A, B, and C are available on request.
What Should Happen?
Bug report: Remote Control returns HTTP 403 on the in-session /bridge path, while claude remote-control works on the same machine and account
Summary
On one Windows machine, every attempt to attach an existing interactive session to Remote Control fails with:
Remote Control failed to connect: Remote Control server rejected the request (HTTP 403) — run /remote-control to retry
This affects /remote-control typed inside a session, the --remote-control startup flag, and remoteControlAtStartup: true. Retrying never helps.
On the very same machine and account, the standalone command claude remote-control --name <name> connects successfully: environment registration returns 200, a session is created, heartbeats return 200, and the session is visible in the mobile app. So credentials, organization, and network are fine. The 403 is specific to the /bridge reattach path.
The problem has persisted since 2026-09-09/10 across client versions 2.1.266 (worked on 2026-09-10), 2.1.269, and 2.1.272, and is still reproducible on 2026-09-19.
Environment
| Item | Value |
|---|---|
| OS | Windows 11 Pro 10.0.26200 |
| Hostname | CHIEN_VOI |
| machine_id (from bridge debug log) | 64d7a1ba-48e6-409c-9cd7-ce748480e541 |
| organization_uuid (from bridge debug log) | e2c95ed2-9a57-4051-ab99-9bdb2d1bc827 |
| Claude Code (VS Code extension binary) | 2.1.272 (anthropic.claude-code-2.1.272-win32-x64) |
| Claude Code (CLI on PATH) | 2.1.269 |
| Auth | OAuth, valid, scope includes user:sessions:claude_code |
| Sandbox | off |
Reproduction
A. Failing path (in-session bridge)
- Open any interactive session, for example in the VS Code extension, working directory
C:\Users\admin\ToolRegIG. - Type
/remote-control(or start with--remote-control "name", or setremoteControlAtStartup: true). - Result: the 403 banner above.
Debug log (--debug-file … --verbose) for this path shows:
[bridge:repl] Reattaching to persisted bridge session cse_…
[code-session] /bridge failed 403: Permission denied
/bridge 403 source=origin
source=origin indicates the origin server rejected the request, not the CDN.
B. Working path (standalone Remote Control), same machine, same minute
cd C:\Users\admin\ToolRegIG
claude remote-control --name RC-probe --debug-file rc_probe.log --verbose
Debug log excerpt (2026-09-18T17:27Z):
[bridge:init] bridgeId=c33ed313-6513-4e8d-9ae3-740aafe9ec2a dir=C:\Users\admin\ToolRegIG machine=CHIEN_VOI
[bridge:api] POST /v1/environments/bridge -> 200 environment_id=env_01XgKrGHwWaXEWS6G6cgwkgB
[bridge:init] Created initial session session_01DC4Zh8GVfBTH3fSBbLijfG
[bridge:work] Starting poll loop spawnMode=same-dir maxSessions=32
[bridge:api] GET .../work/poll -> 200 workId=cse_01DC4Zh8GVfBTH3fSBbLijfG type=session
[bridge:api] POST .../work/cse_01DC4Zh8GVfBTH3fSBbLijfG/ack -> 200
[bridge:session] CCR v2: registered worker epoch=1 attempt=1
[bridge:api] POST .../work/cse_01DC4Zh8GVfBTH3fSBbLijfG/heartbeat -> 200 lease_extended=true state=active
Zero 403s in this log. The session appeared in the Claude mobile app immediately.
C. Reattaching the existing session by ID also fails
claude remote-control --session-id e8cb1e68-b952-45e1-96dd-a2eace213258 --name ToolRegIG-VSCode
Result:
Error: Could not reach the server to look up session e8cb1e68-b952-45e1-96dd-a2eace213258. Check your network or run `claude /login`, then try again.
Network was verified working seconds earlier (path B). The session ID is the local session UUID of the VS Code extension session; it appears the lookup only knows server-issued cse_… IDs, so there is no way to expose an already-running interactive session.
What has been ruled out (measured, not assumed)
claude doctorreports no problems. No managed settings. No API key override.- OAuth token valid and not expired; scope includes
user:sessions:claude_code; organization matches. - Network and CDN: WebSocket handshake to
wss://bridge.claudeusercontent.comreturns 101; a WireGuard split-tunnel VPN made no difference when disabled. - Client version: 2.1.269 and 2.1.272 both fail on path A; 2.1.266 succeeded on path A on 2026-09-10, so the change is server-side or account-state related, not client-side.
- Working directory: sessions started from the home directory and from project directories fail identically on path A.
- Concurrent sessions: with a single session open the 403 persists.
- Trusted devices:
POST /api/auth/trusted_devicesalways returns"reused_existing": false, even while path B is working, so that flag is not diagnostic. Clearing Trusted devices and Active sessions on claude.ai and opening fresh sessions did not fix path A.
Impact
No interactive session on this machine can be attached to Remote Control. Only fresh sessions spawned by claude remote-control are reachable from the phone, so any context built in an interactive or VS Code session cannot be continued remotely. remoteControlAtStartup had to be disabled because every session otherwise shows the 403 banner repeatedly.
Questions
- Why does the
/bridgeendpoint return 403 Permission denied for this machine and account, whilePOST /v1/environments/bridgeon the same machine, account, and token returns 200? - Is there server-side per-machine or per-account state on the
/bridgepath (for example a stale persisted bridge sessioncse_…that the client keeps trying to reattach) that can be reset? - Is there a supported way to attach an already-running interactive session (local session UUID) to Remote Control, given that
--session-idonly resolves server-issued session IDs?
Debug logs for paths A, B, and C are available on request.
Error Messages/Logs
Steps to Reproduce
Bug report: Remote Control returns HTTP 403 on the in-session /bridge path, while claude remote-control works on the same machine and account
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.276
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
4 Comments
Same behavior here, on Windows.
Environment
ANTHROPIC_API_KEY/CLAUDE_CODE_OAUTH_TOKENset; logged out and back in with the subscription accountWhat works
claude remote-controlfrom PowerShell connects and stays connected, same machine and same account.What fails
/remote-controlfrom an interactiveclaudesession:Remote Control server rejected the request (HTTP 403). It fails the same way in the repo folder and in the home folder, so it is not caused by project settings.Remote Control initialization failed. That includes a new session with a transcript under 1 MB, so the transcript-size theory from #91717 / #95619 does not explain this case.remote-control.loghas shown the following since 2026-09-25, and every hourly summary has"register_ok":0:``
``serve gate off: hidden from settings; instance kept
state pending → off trigger=gate intent=default
Possibly related
The standalone CLI also hit
CCR v2 worker registration failed ... 404while showingConnected. The cause was a stalebridge-pointer.jsonpointing at an expired session, as described in #93409. Backing up the pointer, stopping the stale process, and waiting about 5 minutes for the server-side lease (already served) to expire fixed that one. The desktop-app failure was still there after that fix.Follow-up with a narrower window from the desktop app's own logs (same Windows 11 Home machine and account as my previous comment).
Desktop per-session toggle worked until an app restart on 2026-09-29, with no version change
main.log(desktop app, Microsoft Store / MSIX):The app path before and after the restart is the same package,
Claude_2.9939.4.0_x64, so the desktop version did not change.remote-control.logat that relaunch:Every launch since then logs the same
→ off trigger=gate, and every per-session toggle fails in the same millisecond as the "Enabling remote control" line, before any network request is logged:So the same desktop build went from working to failing across a plain restart. That looks like a value re-evaluated at launch (a gate or entitlement), not a local file or version problem.
Still failing today (2026-10-02)
claude remote-control(CLI 2.1.286, WinGet) on the same machine and account still connects~/.claude.jsonparses fine; CLI and desktop use the same organizationHappy to provide more log lines if a specific prefix would help.
Additional data point (Windows 11, Claude Code 2.1.294): in my case, the 403 depends on whether the session was resumed. With the same launcher,
/remote-controlconnects in a fresh session but returns 403 every time in a session started withclaude -r.claude remote-controlalso works on the same machine and account. The resumed session's transcript is 2.8 MB, so the transcript-size theory from #91717 doesn't seem to apply.FYI the below is from Claude helping me debug, so take with a grain of salt
"Confirming this on macOS with the VS Code extension, and adding a debug log that I think
answers the question in the issue body about a stale persisted
cse_…record.Same split as @LZong-tw reports above: a fresh session connects, a resumed one returns
403 every time. In my case the same conversation failed for about a week.
What the debug log shows
Resumed from a terminal with
--remote-control --debug-file … --verbose(ids replaced):So unarchiving that record succeeds with a 200, and the credentials call on
/bridgethenrefuses it deterministically. The refusal looks scoped to that one session record rather than to
the account, the device or the machine: other sessions on the same account connected throughout.
The part I have not seen mentioned
On 2.1.292 the client gives up after three attempts and creates a fresh session, which
connects in under a second. After that the new id is the last one persisted in the conversation,
so reopening the same conversation in the IDE attaches to the healthy record instead of the bad
one. That ended a week of failures for me without any config change.
The week of failures was on 2.1.265 — the extension host had not been reloaded for a while, so
running sessions were still on that build. I have not checked whether 2.1.265 lacks this fallback.
Transcript size does not explain it
Corroborating @llsmgodo-create and @LZong-tw, but as a direct experiment: I trimmed the failing
conversation's transcript from about 872 MB down to 740 KB (420 lines), smaller than
conversations that were connecting fine, and it still returned 403 on resume. The size theory from
#91717 is being relayed into several issues as the fix, and it did not hold here.
Open question
@LZong-tw is on 2.1.294, which should carry the same fallback I hit on 2.1.292, yet reports 403
on every resumed session. If the fallback is conditional on something — perhaps on the unarchive
returning 200 — that would be worth knowing, since it decides whether this self-heals or not."