Repository navigation
fix(core): send the budget-final notice as a message, not a system suffix - #460
Conversation
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
b192558 to
f5fb6b6
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Stacked on #459.
When a run's turn, tool-call or cost budget runs out, QQ grants one final response turn. It asked for that response by appending the notice to the system prompt. That changed the head of the provider's cached prefix, so the final turn re-sent the whole system prompt and the full history uncached. It is the last turn of a run, when the context is largest. ADR-0054 § 2 already put the checkpoint and continuation notices in messages for this reason; this applies the same rule to the budget-final notice.
The notice is now a framed
[QQ runtime notice; not a user instruction]user message, placed last. It is stored with the turn's ordered notices (model_turns.goal_notice, as the goal handoff notices already are), so a later run in the session replays it where the model saw it. No schema or protocol change is needed. The system prompt, its hash, and the turn's static prefix stay the run's own. The now-unusedsha2import inlib.rsis moved to test-only code.Verification
sessions::tests::budgets::turn_budget_grants_one_final_response_then_settles_as_budget_exhaustednow asserts that the final request's system prompt equals the first request's, that the notice is the last message, and that a follow-up run replays the notice before "final status". It failed on fix(core): keep the system prompt identical across task workspaces #459's code and passes now.a_budget_final_turn_after_a_report_gets_no_continuation_notice,the_budget_final_turn_outranks_a_due_report) now assert the message placement instead.cargo xtask checkpasses. Two entries inxtask/src/legacy-sleeps.txtmoved by one line because the import moved; no new sleeps.docs/design/architecture.mdand thePreparedStaticPrefixdoc comment no longer say the budget-final turn changes the system text.