claude-code - 💡(How to fix) Fix [Bug] Session names auto-overwritten, ignoring user-set names [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49712Fetched 2026-04-17 08:33:32
View on GitHub
Comments
0
Participants
1
Timeline
8
Reactions
0
Author
Participants
Timeline (top)
labeled ×3mentioned ×3subscribed ×2

Error Message

[{"error":"Error: Failed to download binary from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.111/darwin-arm64/claude: Request failed with status code 429\n at qm1 (/$bunfs/root/src/entrypoints/cli.js:2749:7628)\n at async ic9 (/$bunfs/root/src/entrypoints/cli.js:2749:7718)\n at async tc9 (/$bunfs/root/src/entrypoints/cli.js:2749:14732)\n at async jm1 (/$bunfs/root/src/entrypoints/cli.js:2749:17407)\n at async ec9 (/$bunfs/root/src/entrypoints/cli.js:2751:322)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8273:14278)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T15:36:38.142Z"},{"error":"AxiosError: Request failed with status code 429\n at DU (/$bunfs/root/src/entrypoints/cli.js:110:1194)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:115:12744)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:117:2467)\n at async _m1 (/$bunfs/root/src/entrypoints/cli.js:2749:5945)\n at async qm1 (/$bunfs/root/src/entrypoints/cli.js:2749:7256)\n at async ic9 (/$bunfs/root/src/entrypoints/cli.js:2749:7718)\n at async tc9 (/$bunfs/root/src/entrypoints/cli.js:2749:14732)\n at async jm1 (/$bunfs/root/src/entrypoints/cli.js:2749:17407)\n at async ec9 (/$bunfs/root/src/entrypoints/cli.js:2751:322)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8273:14278)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T15:36:38.143Z"},{"error":"AxiosError: Request failed with status code 402\n at DU (/$bunfs/root/src/entrypoints/cli.js:110:1194)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:115:12744)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)…

Code Example

[{"error":"Error: Failed to download binary from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.111/darwin-arm64/claude: Request failed with status code 429\n    at qm1 (/$bunfs/root/src/entrypoints/cli.js:2749:7628)\n    at async ic9 (/$bunfs/root/src/entrypoints/cli.js:2749:7718)\n    at async tc9 (/$bunfs/root/src/entrypoints/cli.js:2749:14732)\n    at async jm1 (/$bunfs/root/src/entrypoints/cli.js:2749:17407)\n    at async ec9 (/$bunfs/root/src/entrypoints/cli.js:2751:322)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8273:14278)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T15:36:38.142Z"},{"error":"AxiosError: Request failed with status code 429\n    at DU (/$bunfs/root/src/entrypoints/cli.js:110:1194)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:115:12744)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/src/entrypoints/cli.js:117:2467)\n    at async _m1 (/$bunfs/root/src/entrypoints/cli.js:2749:5945)\n    at async qm1 (/$bunfs/root/src/entrypoints/cli.js:2749:7256)\n    at async ic9 (/$bunfs/root/src/entrypoints/cli.js:2749:7718)\n    at async tc9 (/$bunfs/root/src/entrypoints/cli.js:2749:14732)\n    at async jm1 (/$bunfs/root/src/entrypoints/cli.js:2749:17407)\n    at async ec9 (/$bunfs/root/src/entrypoints/cli.js:2751:322)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8273:14278)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T15:36:38.143Z"},{"error":"AxiosError: Request failed with status code 402\n    at DU (/$bunfs/root/src/entrypoints/cli.js:110:1194)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:115:12744)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)
RAW_BUFFERClick to expand / collapse

Bug Description Session name auto-rename loop overwrites user-set names

Type: bug / UX regression

Problem

In Claude Code desktop, session names are being auto-overwritten with random snippets from conversation dialog. I rename a session to something meaningful, continue working, and Claude Code silently overwrites my name with arbitrary dialog text. Rename → get overwritten → rename again → get overwritten. Endless loop.

What I want instead

For agent-driven workflows, session names should be the agent name or workstream identifier — things like:

  • captain
  • designex
  • devex
  • of-mobile
  • iscp
  • mdpal-cli

Short, stable, meaningful labels that tell me which agent this session is running. Random dialog snippets like "I'll start by reading the file" tell me nothing — they describe what just happened, not what this session IS.

Impact

  • User-set names get overwritten
  • For multi-agent workflows (captain + N worktree agents in parallel tabs), I need stable short names to distinguish them
  • Can't reliably find a session by name — they change without my action
  • Forces repeated manual intervention just to keep the name I set
  • Undermines the whole point of naming a session (organization, recall, tab differentiation)

Expected behavior

Once a user explicitly sets a session name, Claude Code should never auto-rename it. Even better: let the agent set the session name programmatically at startup (e.g., from $AGENTNAME env var) so it's automatic but deterministic and meaningful.

Suggested fix

  1. Track name source: user | auto | agent
  2. Auto-rename only when source is auto
  3. First user rename flips source to user and stops further auto-rename forever
  4. Expose a way for agents to self-name at startup (e.g., CLAUDE_SESSION_NAME env var or a hook)

Reproduction

  1. Start a Claude Code desktop session
  2. Rename to something specific (captain, designex, etc.)
  3. Continue the conversation
  4. Watch the name get overwritten with a random dialog fragment within a few turns

Happens reliably, multiple times per session.

Reporter

Jordan Dea-Mattson Head of Product and Technology, OrdinaryFolk (soon CPTO)

Hits this constantly running multi-agent workflows (captain + N worktree agents in parallel tabs). Building TheAgency — an open-source AI Augmented Development framework — where multi-session tab differentiation is central to the workflow.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.110
  • Feedback ID: 61261384-a937-472e-bb41-a604caf56f0e

Errors

[{"error":"Error: Failed to download binary from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.111/darwin-arm64/claude: Request failed with status code 429\n    at qm1 (/$bunfs/root/src/entrypoints/cli.js:2749:7628)\n    at async ic9 (/$bunfs/root/src/entrypoints/cli.js:2749:7718)\n    at async tc9 (/$bunfs/root/src/entrypoints/cli.js:2749:14732)\n    at async jm1 (/$bunfs/root/src/entrypoints/cli.js:2749:17407)\n    at async ec9 (/$bunfs/root/src/entrypoints/cli.js:2751:322)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8273:14278)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T15:36:38.142Z"},{"error":"AxiosError: Request failed with status code 429\n    at DU (/$bunfs/root/src/entrypoints/cli.js:110:1194)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:115:12744)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/src/entrypoints/cli.js:117:2467)\n    at async _m1 (/$bunfs/root/src/entrypoints/cli.js:2749:5945)\n    at async qm1 (/$bunfs/root/src/entrypoints/cli.js:2749:7256)\n    at async ic9 (/$bunfs/root/src/entrypoints/cli.js:2749:7718)\n    at async tc9 (/$bunfs/root/src/entrypoints/cli.js:2749:14732)\n    at async jm1 (/$bunfs/root/src/entrypoints/cli.js:2749:17407)\n    at async ec9 (/$bunfs/root/src/entrypoints/cli.js:2751:322)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8273:14278)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T15:36:38.143Z"},{"error":"AxiosError: Request failed with status code 402\n    at DU (/$bunfs/root/src/entrypoints/cli.js:110:1194)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:115:12744)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)…

Note: Content was truncated.

extent analysis

TL;DR

The issue can be addressed by implementing a mechanism to track the source of the session name and only allowing auto-rename when the source is 'auto', while also providing a way for agents to set the session name programmatically.

Guidance

  • Implement a tracking system for the session name source, categorizing it as 'user', 'auto', or 'agent', to determine when auto-rename should occur.
  • Modify the auto-rename logic to only rename sessions when the source is 'auto', preventing overwrites of user-set names.
  • Introduce a feature for agents to set the session name at startup, such as through an environment variable like CLAUDE_SESSION_NAME, to ensure deterministic and meaningful names.
  • Consider adding a hook for agents to programmatically set the session name, enhancing flexibility and automation.

Example

No specific code example can be provided without more context on the existing implementation, but the suggested fix implies modifying the session name handling logic to include source tracking and conditional auto-rename.

Notes

The provided error logs seem unrelated to the session name auto-rename issue, as they pertain to download failures and request status codes. The solution should focus on modifying the session name management logic as suggested.

Recommendation

Apply the workaround by implementing the suggested tracking and auto-rename logic adjustments, as well as introducing a method for agents to set session names programmatically, to address the session name auto-rename loop issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Session names auto-overwritten, ignoring user-set names [1 participants]