[BUG] Remote Control fails with "Failed to convert session context" for self-hosted git remotes
Resolved 💬 4 comments Opened Mar 13, 2026 by njk7740 Closed Apr 11, 2026
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?
Remote Control (/remote-control) fails with HTTP 400 "Failed to convert session context" when the repository has a
self-hosted git remote URL with a non-standard port (e.g. https://example.com:8443/org/repo.git).
Environment registration succeeds, but session creation fails immediately after.
What Should Happen?
Remote Control should work regardless of the git remote URL format (self-hosted, non-standard ports, etc.)
Error Messages/Logs
[bridge:api] POST /v1/environments/bridge -> 200 environment_id=env_...
[bridge] Session creation failed with status 400: Failed to convert session context
[bridge:repl] Session creation failed, deregistering environment
Steps to Reproduce
- Open Claude Code in a git repository with a self-hosted remote:
git remote set-url origin https://example.com:8443/org/repo.git
- Run /remote-control
- Session creation fails with status 400
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.74
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
- Works fine in non-git directories
- Works fine in git repos without a remote, or with standard GitHub remotes
- Tested: removing CLAUDE.md does NOT fix it, only removing the git remote fixes it
- Debug log attached (ran with claude --debug)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗