[FEATURE] CLI flag / settings.json key to pre-select session-resume mode (auto-restart use case)

Resolved 💬 2 comments Opened May 27, 2026 by kylemarham Closed May 31, 2026

Use case

I run Claude Code as a long-running unattended assistant inside a tmux session, managed by macOS launchd. The session is resumed across reboots via:

claude --resume <session-id> --channels plugin:discord@... --dangerously-skip-permissions

When the underlying session grows large (e.g. 13h, 761k tokens), Claude Code 2.1+ shows this interactive prompt on resume:

This session is 13h 22m old and 761k tokens.
Resuming the full session will consume a substantial portion of your usage limits. We recommend resuming from a summary.

❯ 1. Resume from summary (recommended)
  2. Resume full session as-is
  3. Don't ask me again

After a reboot, nobody is at the terminal to answer it. The session sits at the prompt indefinitely until manually attended. That defeats the whole point of an auto-restart / launchd setup.

What I'm asking for

Either:

Option A — CLI flag:

claude --resume <id> --resume-mode summary   # auto-pick "Resume from summary"
claude --resume <id> --resume-mode full      # auto-pick "Resume full session as-is"
claude --resume <id> --resume-mode prompt    # current behavior (default)

Option B — settings.json key:

{
  "session": {
    "resumeMode": "summary"   // "summary" | "full" | "prompt" (default)
  }
}

Either is fine. The CLI flag gives per-invocation control (useful for differentiating "interactive resume from picker" vs "scripted resume by ID"). The settings.json key gives a persistent default which can also be edited from a launcher script before invocation.

Workaround I'm using now

Backgrounded tmux send-keys after a 15-second sleep, into the launched session, to type 1 + Enter. It works but is ugly and racy — if Claude takes longer than 15s to render the prompt the keystroke goes elsewhere.

Why not "Don't ask me again"

For a scripted reboot scenario I want a deterministic answer set OUTSIDE the running process. Picking option 3 from inside the running TUI requires a human to be there once, which I'm specifically trying to avoid (and also has the ambiguity that #60848 already raises).

Related

  • #60848 — separate UX ambiguity issue on the same prompt
  • #62788 — broader "scheduled auto-resume" feature request

Environment

  • Claude Code 2.1.150
  • macOS Sonoma 15.x, launchd-managed tmux session
  • Anthropic auth via Claude Max subscription

View original on GitHub ↗

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