claude-code - 💡(How to fix) Fix Feature request: Canonical trigger phrase or slash command for agents to self-report resume command [1 comments, 2 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#52702Fetched 2026-04-24 10:41:58
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
labeled ×2commented ×1

Related to #52262 (agents cannot self-report their resume command). Even once the session ID is retrievable, there is no canonical way for a user to ask "what is the full command to resume this session?" and get a reliable, consistent answer.

Root Cause

Multi-agent workflows (1 PM + 6-8 workers) require users to reattach specific sessions every time they log out, switch terminals, upgrade CLI, or recover from a crash. Without a reliable self-report mechanism, users waste time asking, getting wrong answers, and manually hunting JSONL files.

Related: #52262, #37442.

RAW_BUFFERClick to expand / collapse

Summary

Related to #52262 (agents cannot self-report their resume command). Even once the session ID is retrievable, there is no canonical way for a user to ask "what is the full command to resume this session?" and get a reliable, consistent answer.

Current behavior

Asking three different agents the same question gets three different (mostly wrong) answers:

  • Agent 1: "--resume does not exist, you have to start a new session"
  • Agent 2: "Just run claude in the project directory, the compact recovery handles it"
  • Agent 3 (after being corrected): Finally gives the correct command

The variation is a UX failure. Users have no reliable phrase or command that will consistently work across all agents.

Requested behavior

Either:

  • A canonical slash command like /resume-command that prints the exact reattach command for the current session
  • A documented magic phrase that all agents are trained to respond to consistently
  • An environment variable CLAUDE_SESSION_ID + a documented template users can rely on

Why this matters

Multi-agent workflows (1 PM + 6-8 workers) require users to reattach specific sessions every time they log out, switch terminals, upgrade CLI, or recover from a crash. Without a reliable self-report mechanism, users waste time asking, getting wrong answers, and manually hunting JSONL files.

Related: #52262, #37442.

extent analysis

TL;DR

Implementing a canonical slash command, such as /resume-command, could provide a reliable way for users to retrieve the full command to resume a session.

Guidance

  • Introduce a standardized command or phrase that all agents can recognize and respond to consistently, ensuring users receive the correct resume command.
  • Consider using an environment variable like CLAUDE_SESSION_ID along with a documented template for users to construct the resume command.
  • Evaluate the feasibility of integrating compact recovery handling, as mentioned by Agent 2, to simplify the resume process.
  • Develop clear documentation for the chosen solution to ensure users understand how to use it effectively.

Example

No specific code example is provided due to the lack of technical implementation details in the issue.

Notes

The solution should prioritize consistency and reliability across all agents to address the UX failure and user frustration.

Recommendation

Apply a workaround by introducing a canonical slash command, such as /resume-command, to provide users with a reliable method to retrieve the resume command for their session. This approach addresses the immediate need for consistency and can be refined based on user feedback and further development.

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 Feature request: Canonical trigger phrase or slash command for agents to self-report resume command [1 comments, 2 participants]