[BUG] --teleport fails with "Session not found" despite valid session (claude.ai returns 403 to CLI)
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?
claude --teleport session_xxx always fails with "Session not found" even though the session is active and accessible on claude.ai/code.
The root cause appears to be that claude.ai API endpoints return HTTP 403 to non-browser HTTP clients, while api.anthropic.com endpoints work correctly with the same OAuth token.
Evidence:curl -H "Authorization: Bearer $TOKEN" "https://api.anthropic.com/v1/session_ingress/session/session_xxx" → Returns full session data with loglines ✅curl -H "Authorization: Bearer $TOKEN" "https://claude.ai/api/code/sessions" → HTTP 403 ❌
Same claude.ai URL in browser → Returns JSON normally ✅
claude --teleport (without ID, to list sessions) → "Error loading Claude Code sessions" ❌
The CLI appears to validate/fetch sessions via claude.ai endpoints (which get 403'd) rather than api.anthropic.com (which works fine).
What Should Happen?
claude --teleport <session_id> should successfully connect to and resume the web session. The CLI should either use api.anthropic.com endpoints (which work), or handle claude.ai 403 responses gracefully with a meaningful error message.
Error Messages/Logs
2026-02-08T05:29:48.335Z [DEBUG] Resuming code session ID: session_xxx
2026-02-08T05:29:48.623Z [ERROR] Error: Error: Session not found: session_xxx
at pxT (/$bunfs/root/claude:1931:39772)
at async ds (/$bunfs/root/claude:2879:1875)
at async Oy8 (/$bunfs/root/claude:6381:552)
at async E40 (/$bunfs/root/claude:6364:813)
at processTicksAndRejections (native:7:39)
2026-02-08T05:29:48.624Z [ERROR] TeleportOperationError: TeleportOperationError: Session not found: session_xxx
No HTTP request URL is logged between "Resuming code session ID" and the error — the fetch appears to fail silently.
Steps to Reproduce
- Start a Claude Code session on claude.ai/code (web interface)
- Copy the session ID from the URL (format: session_01Mhb...)
- In terminal, run
claude --teleport session_01Mhb... - Error: "Session not found"
- Verify the session is accessible via API: curl -H "Authorization: Bearer $(security find-generic-password -s 'Claude Code-credentials' -w | python3 -c "import sys,json; print(json.load(sys.stdin)['claudeAiOauth']['accessToken'])")" "https://api.anthropic.com/v1/session_ingress/session/<SESSION_ID>" — returns full session data
- Verify claude.ai is 403'd: curl -v -H "Authorization: Bearer $TOKEN" "https://claude.ai/api/code/sessions" — returns HTTP 403
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.37 (also tested 2.1.17 and 2.1.0 — same error)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
- Tested across multiple Claude Code versions (2.1.0, 2.1.17, 2.1.37)
- Tried re-authentication (claude logout → claude login) multiple times
- Tried switching DNS to Google (8.8.8.8) — no change
- Tried checking out the matching git branch — no change
- Location: Australia (Sydney) — possibly relevant to Cloudflare geo-blocking
This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗