diff --git a/hive-c0re/src/coordinator.rs b/hive-c0re/src/coordinator.rs index ec21b0d..4b44861 100644 --- a/hive-c0re/src/coordinator.rs +++ b/hive-c0re/src/coordinator.rs @@ -178,15 +178,25 @@ impl Coordinator { /// Drop a system message into the given agent's inbox. Wakes the /// turn loop with a "you were just (re)started" hint — operator /// caused the transition, agent picks up where it left off - /// (notes are in /state/, last turn is in --continue's session). - /// Best-effort; broker errors are logged but don't propagate. + /// (notes are in the bind-mounted state dir, last turn is in + /// --continue's session). Best-effort; broker errors are logged + /// but don't propagate. pub fn kick_agent(&self, name: &str, reason: &str) { + // Manager keeps the legacy `/state` mount; sub-agents see + // their state at `/agents//state` (see lifecycle.rs's + // `notes_mount`). Tell each agent the path it can actually + // ls without translating. + let state_path = if name == crate::lifecycle::MANAGER_NAME { + "/state/".to_owned() + } else { + format!("/agents/{name}/state/") + }; let body = format!( "{reason}\n\nYou were just (re)started by the operator. \ - If you were mid-task, check `/state/` for your notes \ - and pick up where you left off. claude's `--continue` \ - session is intact, so prior context is still in your \ - window." + If you were mid-task, check `{state_path}` for your \ + notes and pick up where you left off. claude's \ + `--continue` session is intact, so prior context is \ + still in your window." ); if let Err(e) = self.broker.send(&hive_sh4re::Message { from: hive_sh4re::SYSTEM_SENDER.to_owned(),