Skip to content

[BUG] Remote control session stuck in pending state after disconnection #39521

Description

@henry9zhr

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

After stopping claude remote-control on a remote host, the claude.ai/code web UI correctly shows "Disconnected" status but the session becomes stuck — the github_compare_branches TanStack Query continues retrying indefinitely against the dead session_ingress proxy, causing persistent 401 errors and preventing the session from reaching a clean idle state.

failed request: POST https://claude.ai/v1/session_ingress/session/{SESSION_ID}/git_proxy/compare

What Should Happen?

Claude code webpage/desktop should end this session

Error Messages/Logs

N/A

Steps to Reproduce

  1. Start claude remote-control on a remote host
  2. Open the bridged session in claude.ai/code
  3. Interact with the session (Claude creates a working branch like claude/main-R1175)
  4. Stop the claude remote-control process on the remote host (Ctrl+C or kill)
  5. Observe the web UI

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.81

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions