Menu

#108 Use 'claude -c' instead of 'claude -r <session-id>' for session resume

closed
nobody
None
2026-04-21
2026-04-09
Anonymous
No

Originally created by: kumaakh

Background

When resuming a Claude CLI session, two flags are available:

  • claude -r <session-id> — resume a specific session by ID
  • claude -c — resume the most recent session (no ID needed)

Fleet currently uses -r <session-id> for resume, which requires storing and passing session IDs around.

Proposal

Switch to claude -c for session resume. Since fleet does not use session IDs to select which session to resume (it always resumes the most recent one for a given member), -c is sufficient and simpler.

Session IDs can still be collected and stored after each run for debugging and analysis purposes — they just don't need to be passed back in to drive the resume.

Benefits

  • Simpler code path — no need to thread session IDs through the resume logic
  • Less state to manage per member
  • -c is more robust if a session ID is ever lost or corrupted
  • Session IDs retained for observability/debugging without being load-bearing

What to Check

  • Where -r <session-id> is currently used in execute_prompt / session management code
  • Ensure session ID is still captured from CLI output after each run and stored (for logs/debug)
  • Verify -c behaves correctly when there is no prior session (should start a fresh session, same as today)

Related

Tickets: #143

Discussion

  • Anonymous

    Anonymous - 2026-04-09

    Originally posted by: kumaakh

    Apply the same change for Gemini CLI — use the equivalent of -c (resume most recent session without an explicit session ID) instead of resuming by ID. Session IDs should still be captured and stored for debugging, but not used as the resume mechanism.

     
  • Anonymous

    Anonymous - 2026-04-21

    Originally posted by: kumaakh

    Closed — fixed by PR [#143] (merged to main). Claude session resume now uses -c flag instead of --resume <session-id>.

     

    Related

    Tickets: #143

  • Anonymous

    Anonymous - 2026-04-21

    Ticket changed by: kumaakh

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB