Repository navigation
chore(loop): remove --max-turn-secs wall-clock turn budget - #479
Merged
Merged
Conversation
The per-turn wall-clock budget conflated "turn duration" with "turn liveness": a healthy xhigh run can stream reasoning well past any fixed cap, while a genuinely dead stream is already caught by the agent's idle timeouts (STREAM_IDLE_TIMEOUT_SECS=45 and idle_timeouts_for). The timeout also never actually aborted the underlying agent run — it only dropped the loop's stream subscription, so "relaunch to continue" really meant "requeue behind the still-running turn". Kill-time decisions belong to the orchestrator (monitor_poll + worker stop already expose the observe-then-kill primitives), so the flag is removed rather than fixed. Default (0 = unlimited) behavior is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Remove the
--max-turn-secsflag fromfuture loop run.Why
The per-turn wall-clock budget conflated turn duration with turn liveness:
STREAM_IDLE_TIMEOUT_SECS=45(LLM layer) andidle_timeouts_for(run_loop layer, high/xhigh = 180s/60s).Worse, the timeout never actually aborted the underlying agent run —
tokio::time::timeoutonly drops the loop's stream subscription, while the agent-side run is an independent spawned task that keeps running to completion. So "relaunch to continue" really meant "requeue behind the still-running turn" (enqueue_if_busy).Change
Kill-time decisions belong to the orchestrator —
monitor_poll+worker stopalready expose the observe-then-kill primitives. So the flag is removed rather than fixed:run, therun_turnssignature, and the usage/help text.turn_future.await(the transport-error branch is preserved).Default behavior (
0= unlimited) is unchanged — this removes an opt-in knob, not the default path.Checks
cargo fmt -p future-loop --check✅cargo clippy -p future-loop --all-targets -- -D warnings✅cargo test -p future-loop(affected test targets) ✅