Repository navigation
fix(agentmain): add --no-reply-wait for unattended one-shot --task runs - #874
Closed
leonsong09 wants to merge 1 commit into
Closed
leonsong09 wants to merge 1 commit into
leonsong09 wants to merge 1 commit into
Conversation
Author
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.
Problem
agentmain.py --taskwaits up to 600s (300 x 2s) forreply.txtafter round 1 finishes, so an external supervisor can feed a follow-up round (documented inmemory/subagent.md).That is correct for supervised sessions. For unattended callers (scheduler, batch runner, CI) there is no supervisor, so the wait is pure idle:
rc=-999).Evidence
A task whose real work takes ~1200s, run with
timeout_s=1800, hit the wall on three consecutive days:durationis always the timeout value, and the report's mtime is always well before it — i.e. the work completed, only the exit was late.Reproduced minimally:
Change
Add an explicit opt-in flag; default behavior is unchanged, so supervised workflows keep working.
Unattended callers then pass
--no-reply-wait. I deliberately avoided inferring it from--nobg(that would silently change existing semantics) and avoided turning the 600s into a tunable (that would treat the symptom, not the cause).Testing
py_compileOK.--nolog/--no-user-tools/--nobgall still present and parsed.Closes #866