huskies: merge 652_story_pass_resume_session_id_on_agent_respawn_so_new_sessions_inherit_prior_reasoning

This commit is contained in:
dave
2026-04-27 11:23:28 +00:00
parent 144f07f412
commit ac85cfce5d
8 changed files with 319 additions and 10 deletions
+8
View File
@@ -32,6 +32,13 @@ pub struct RuntimeContext {
/// than `claude -p <full_prompt>`. The agent re-enters the previous
/// conversation and receives the `prompt` (if non-empty) as a new message.
pub session_id_to_resume: Option<String>,
/// Full rendered prompt for a fresh session, kept as fallback if resume fails.
///
/// When `session_id_to_resume` is `Some`, `prompt` contains only the
/// resume context (e.g. gate failure output). If the CLI rejects the
/// resume (session expired, file missing, version mismatch), the runtime
/// retries with this full prompt and no `--resume` flag.
pub fresh_prompt: Option<String>,
}
/// Result returned by a runtime after the agent session completes.
@@ -101,6 +108,7 @@ mod tests {
inactivity_timeout_secs: 300,
mcp_port: 3001,
session_id_to_resume: None,
fresh_prompt: None,
};
assert_eq!(ctx.story_id, "42_story_foo");
assert_eq!(ctx.agent_name, "coder-1");