[Bug] Background task creation fails with session upload error without debug mode

Resolved 💬 3 comments Opened Jan 5, 2026 by kromtom Closed Jan 6, 2026

Bug Description

When I use the "& to background" task in Claude Code terminal, Claude Code responds with following error:

& {Prompt to create a plan to refactor a file from repository}
⎿  Read internal/indicators/indicators.go (540 lines)
⎿  Failed to create background session: Failed to upload session history (message 1/3). Try running /login and signing in with a claude.ai account (not Cons
ole).

I tried this a few times, after re-authenticating with /login and got the same error message. Then I started claude code in debug mode claude --debug and the task was created successfully.

When I looked at the CC Web https://claude.ai/code I see all my attempts as sessions hanging on "Starting Claude Code...". Running /tasks in Claude Code terminal only shows the last one, that was successfully executed, but the task doesn't have valid session URL:


Remote session details

│ Status: running
│ Runtime: 18m 22s
│ Title: Plan refactor of indicators using existing library
│ Progress: running…
│ Session URL: https://claude.ai/code/rsessio

│ Teleport failed: Invalid session ID: rsessio

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.0.76
  • Feedback ID:

Errors

[{"error":"AxiosError: Request failed with status code 403\n    at bx (file:///Users/tkrom/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:56:1137)\n    at Unzip.<anonymous> (file:///Users/tkrom/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:57:9852)\n    at Unzip.emit (node:events:536:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1698:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n    at fzA.request (file:///Users/tkrom/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:59:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async UT2 (file:///Users/tkrom/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1845:3609)","timestamp":"2026-01-05T23:39:11.007Z"},{"error":"AxiosError: Request failed with status code 403\n    at bx (file:///Users/tkrom/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:56:1137)\n    at Unzip.<anonymous> (file:///Users/tkrom/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:57:9852)\n    at Unzip.emit (node:events:536:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1698:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n    at fzA.request (file:///Users/tkrom/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:59:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Z47 (file:///Users/tkrom/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:3506:460)\n    at async Promise.all (index 0)\n    at async file:///Users/tkrom/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:3492:7087","timestamp":"2026-01-05T23:53:20.249Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗