pub struct ClaudeAgent;Implementations§
Source§impl ClaudeAgent
impl ClaudeAgent
Sourcepub fn exec_resume_command(
session_id: &str,
instruction: &str,
) -> (&'static str, Vec<String>)
pub fn exec_resume_command( session_id: &str, instruction: &str, ) -> (&'static str, Vec<String>)
Build the resume relaunch command for a confirmed checkpoint
auto-decide (D-03/D-04, 28-03). NOT a trait method — --resume is a
Claude-CLI-specific, documented feature with no equivalent on
AgentAdapter (D-05: Claude-only, no Codex/OpenCode accommodation,
AgentAdapter itself is untouched).
Argv order (RESEARCH.md § “Architecture Patterns / Pattern 4”, confirmed): the print flag, the instruction, the resume flag immediately followed by the session id (so the id is parsed as the flag’s value, not a positional argument), the output-format flag with its JSON value, and the permission-bypass flag.
Pitfall 1 (RESEARCH.md, T-28-02) — load-bearing, do not “clean up”:
a claude --resumed session restores NEITHER the permission mode NOR
the output format from the original launch. Both are re-passed here
explicitly even though they look redundant with exec_command’s
launch above. Omitting either reintroduces the exact headless hang
this phase exists to close: the resumed session halts on a
permission prompt with no operator present to answer it, and the
prompt is not guaranteed to even reach the captured stdout.
resume_command_includes_permission_bypass is the named regression
test guarding this specifically — do not delete it as “obviously
redundant” with claude_wraps_prompt_in_noninteractive_flags above;
it guards a DIFFERENT command construction path.
Trait Implementations§
Source§impl AgentAdapter for ClaudeAgent
impl AgentAdapter for ClaudeAgent
Source§fn exec_command(
&self,
_phase: u32,
prompt: &str,
_extra_writable_roots: &[PathBuf],
) -> (&'static str, Vec<String>)
fn exec_command( &self, _phase: u32, prompt: &str, _extra_writable_roots: &[PathBuf], ) -> (&'static str, Vec<String>)
prompt for phase. Returns (program, args). Read moreSource§fn completion_signal_detected(&self, _output: &str) -> bool
fn completion_signal_detected(&self, _output: &str) -> bool
Source§fn extra_env(&self) -> Vec<(String, String)>
fn extra_env(&self) -> Vec<(String, String)>
GIT_CONFIG_*
env scoping keeps the override out of every repo/global config.Source§fn preflight(&self, _state: &State) -> Result<(), String>
fn preflight(&self, _state: &State) -> Result<(), String>
Self::extra_env’s empty-default shape. The
Err variant is a human-readable failure reason that flows into the
preflight gate’s context (run_preflight in devflow-cli/src/main.rs).
This is the trait surface Phase 18’s Hermes adapter implements to
enforce a non-empty reviewer/receiver set — no built-in adapter
(Claude/Codex/OpenCode) overrides it in Phase 17 because no
reviewer-set storage exists yet in state.rs/config.rs (review
consensus #6).