Watch
0
0
Fork
You've already forked hyperhive
0

swarm: /clear starts an agent's next turn on a fresh session

This commit is contained in:
iris 2026-11-16 01:01:31 +01:00
commit fb9d4b5040

View file

@ -448,6 +448,11 @@ pub enum AgentControl {
/// Interrupt the turn in flight, as the agent's own cancel button does.
/// Answered with an [`AgentControlReply`].
Cancel,
/// Start the next turn on a fresh claude session instead of resuming the
/// current one; the swarm UI's `/clear`. Deferred to the turn boundary
/// like the harness's own reset. Answered with an [`AgentControlReply`]
/// whose `acted` is always `true`.
NewSession,
/// Apply a diff to the agent's `AGENTS.md`. Answered with an
/// [`agents_md::ApplyReply`].
ApplyAgentsMd(agents_md::Apply),
@ -462,7 +467,7 @@ pub enum AgentControl {
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct AgentControlReply {
/// Whether the command changed anything: `false` for a cancel that
/// found no turn in flight.
/// found no turn in flight. A [`AgentControl::NewSession`] always acts.
pub acted: bool,
}