warm-resume: drop "read PLAN.md" from the resume nudge

Follow-up to bd517f28. When --resume succeeds, claude-code restores the
full prior conversation — the agent already has its file reads, tool
results, and reasoning in context. Telling it to "read PLAN.md" forces
a redundant tool call to re-read a doc it wrote itself. PLAN.md is the
cold-start orientation doc (driven by AGENT.md); the resume -p prompt
should just be a continuation nudge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
dave
2026-05-13 08:28:01 +00:00
parent bd517f2857
commit 65416476e3
+5 -3
View File
@@ -267,11 +267,13 @@ pub(super) async fn run_agent_spawn(
// resumed session has a deferred-tool marker. Watchdog-killed // resumed session has a deferred-tool marker. Watchdog-killed
// sessions don't have one, so an empty -p aborts the CLI with // sessions don't have one, so an empty -p aborts the CLI with
// "No deferred tool marker found... Provide a prompt to continue // "No deferred tool marker found... Provide a prompt to continue
// the conversation." We default to a brief "continue from // the conversation." When resume succeeds, the agent already has
// PLAN.md" message when no gate-failure context was provided. // its full prior conversation restored (no need to point at
// PLAN.md — that's the cold-start orientation path). A brief
// "continue" nudge is all the CLI needs.
let resume_msg = resume_context_owned.filter(|s| !s.is_empty()).unwrap_or_else( let resume_msg = resume_context_owned.filter(|s| !s.is_empty()).unwrap_or_else(
|| { || {
"Continue from your prior session. Read PLAN.md for your current state and pick up where you left off.".to_string() "Continue your prior work.".to_string()
}, },
); );
(resume_msg, Some(fallback)) (resume_msg, Some(fallback))