[BUG] Remote Control: session creation fails with "The request was invalid" when the environment's git remote is not GitHub (e.g. AWS CodeCommit)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code (2.1.211)
What's Wrong?
When a Remote Control server (claude remote-control --spawn worktree) runs in a repository whose origin remote points to a non-GitHub host (in my case AWS CodeCommit, ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/<repo>), every attempt to start a session from the Claude mobile app or claude.ai/code fails immediately with:
Nachricht konnte nicht gesendet werden — The request was invalid
The request never reaches the local machine: the server stays at Capacity: 0/32, no worktree is created, no session file is written. Two sibling repos on the same machine with GitHub remotes work flawlessly with the identical server command.
The bridge environment registers with the CodeCommit URL:
"config": {
"type": "bridge",
"machine_name": "...",
"directory": "/Users/.../my-repo",
"branch": "main",
"git_repo_url": "ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/<repo>"
}
The client UI already hints at the problem: the composer shows a GitHub-style repo chip reading repos/<repo> — i.e. the CodeCommit URL path /v1/repos/<repo> was mis-parsed as a GitHub owner/name. The backend apparently validates the session-creation request against this mis-parsed repo reference and rejects it.
Confirmed root cause via workaround: temporarily renaming the origin remote before starting the server (so the environment registers with "git_repo_url": null) makes session creation from mobile work immediately. Renaming the remote back afterwards keeps it working — only the value captured at registration matters.
What Should Happen?
Remote Control executes locally and should not require the repo to be hosted on GitHub. git_repo_url should be treated as opaque metadata (or parsed per-host), and session creation should succeed for any git remote (CodeCommit, GitLab, Bitbucket, self-hosted, or no remote at all).
Steps to Reproduce
- Repo with a non-GitHub
origin, e.g.git remote add origin ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/foo claude remote-control --spawn worktree --no-create-session-in-dir- On the Claude mobile app (or claude.ai/code), pick that environment and send any prompt
- → "The request was invalid"; server never sees the request
- Rename the remote (
git remote rename origin other), restart the server, retry → works
Environment
- Claude Code 2.1.211, server mode (
claude remote-control --spawn worktree --no-create-session-in-dir) - macOS (Darwin 25.3.0), claude.ai subscription login
- Observed from both the iOS app and claude.ai/code
🤖 Filed with Claude Code on behalf of the user