Repository navigation
fix(overnight): say stopped and exit 2 when a limit ended the run - #1171
Draft
sosidudku1 wants to merge 3 commits into
Draft
sosidudku1 wants to merge 3 commits into
sosidudku1 wants to merge 3 commits into
Conversation
The task store records a run a budget, time or step ceiling ended as completed, with the cause beside it. The overnight command printed "overnight completed" and exited 0 for it, so a script calling it took unfinished work for a success. It now prints "stopped (<cause>)" with the plain reason line and exits 2; 0 stays for a run the agent finished on its own. ATO-1323
…topped Review: a resume the runner blocked with budget_spent: or time_spent: still said "overnight blocked" and exited 1, while the same limit hit mid-run exits 2. It now says stopped and exits 2 too. The help text names credit_exhausted, which also exits 2. ATO-1323
This branch has not been deployed
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
When a budget, time or step limit (or no progress) ended an overnight run, the task store records it as
completedwith astopCause.atomic-agent overnightprinted "overnight completed" and exited 0, so a script calling it took unfinished work for success. It now printsovernight stopped (<cause>)with the plain reason line and exits 2. The same goes for a resume the runner blocked because earlier attempts had already used the budget or the time (budget_spent:/time_spent:), and forcredit_exhausted. Exit 0 stays for a run the agent finished on its own; 1 is still failed or cancelled. The help text lists the exit codes.Why
A caller has to be able to tell "done" from "stopped at the limit". Linear: ATO-1323.
How it was verified
src/cli/overnight-progress.test.ts.Merge notes
overnight-command.tsandovernight-progress.ts. The merged exit line must beovernightExitCode(final).Not yet checked on the second Mac.