Repository navigation
fix(workflow-tool): drop the host-chosen budget argument - #63
Merged
Merged
Conversation
The workflow tool's `budget` parameter let the host model pick a run's output-token ceiling. Ceilings it guessed were often spent by the run's own fan-out, so `agent()` refused the final synthesize stage and the run ended without its report. Only the user sets a budget now: a `+N` directive in the prompt caps every tool run in that turn, and `/workflow --budget=` and `PI_WORKFLOW_BUDGET` are unchanged. `resolveTurnBudget` loses its explicit-budget parameter. A host that still sends `budget` has it ignored, since TypeBox objects allow extra properties.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
The
workflowtool'sbudgetparameter let the host model choose a run's output-token ceiling. In real host-orchestrated (dynamax) review runs the host guessed ceilings of 65k–75k output tokens. The run's own find/verify fan-out spent those before the final synthesize stage, soagent()threwWorkflowBudgetExceededErrorfor synthesis and the run ended without its report. A stage was refused this way in 3 of 28 runs over two rounds (1 + 2). The hosts then rebuilt reports by hand from the journal, which cost them extra turns. With the argument removed, a third round of 14 runs had no budget refusals.Change
Remove
budgetfrom theworkflowtool's parameter schema. Only the user sets a budget:+Ndirective in the prompt, the turn pool that already caps every tool run in its turn;/workflow --budget=;PI_WORKFLOW_BUDGET.The last two are unchanged.
resolveTurnBudgetdrops its explicit-budget parameter:A host that still sends
budgethas it ignored rather than rejected, because TypeBox objects allow extra properties. The tool test covers this: under a+5kpool, a straybudget: 1234runs at 5000.USAGE.md (turn budget directive section and runtime-knobs table) and the workflow-authoring skill's Budget section now say the tool takes no budget.
Notes
/workflow:runsrelaunch still reapplies a record's ownoptions.budget, so records written before this change keep any ceiling their host chose./budget null/assertion at the end of the turn-budget tool test fails whenPI_WORKFLOW_BUDGETis set in the shell. That dependency predates this PR, so I left it alone.Verification
bun run typecheck: cleanbun run test: 669 pass, 0 fail