remove request_next_turn: same-turn continuation is always worse than an external wake

This commit is contained in:
damocles 2026-07-27 22:07:40 +02:00 committed by mara
commit fffe0a2c29
8 changed files with 103 additions and 253 deletions

View file

@ -626,30 +626,6 @@ impl AgentServer {
.await
}
#[tool(
description = "Ask the harness to start another turn immediately after this one \
completes, even if the inbox is empty. Use this when you have ongoing work that \
spans multiple turns (long builds, multi-step tasks) and you want to continue \
without waiting for an external message. The next turn will start with \
`from: \"self\"` and `body: \"continue\"`. Has no effect if a new inbox message \
arrives before this turn ends the harness already loops immediately on pending \
messages. No args."
)]
async fn request_next_turn(&self) -> String {
run_tool_envelope("request_next_turn", String::new(), async move {
let sentinel = crate::paths::state_dir().join("hyperhive-continue");
match std::fs::write(&sentinel, b"") {
Ok(()) => "ok — harness will start another turn immediately after this one",
Err(e) => {
tracing::warn!(error = %e, path = %sentinel.display(), "request_next_turn: write failed");
return format!("request_next_turn failed: {e}");
}
}
.to_string()
})
.await
}
#[tool(
description = "Compact the current session's context, mirroring the operator's \
dashboard `/compact` button. Gated: only honoured when this agent's last \