[wip] goal shift#23858
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 069206b414
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| let objective_changed = previous_goal | ||
| .as_ref() | ||
| .is_some_and(|previous_goal| previous_goal.objective != goal.objective); |
There was a problem hiding this comment.
Inject steering when external creates a goal
When an external goal is created during an active turn, callers pass previous_goal = None, so objective_changed becomes false and the code skips the steering injection below even though it immediately marks the current turn as pursuing that new goal. In that scenario the model continues the turn without ever seeing the user-created objective, while subsequent token/time accounting is attributed to it; treat a missing previous goal as needing an objective steering item when goal.status is active.
Useful? React with 👍 / 👎.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
usgenes39-dotcom
left a comment
There was a problem hiding this comment.
I found blocking issues in the goal steering/accounting paths.
The existing inline thread on runtime.rs is still valid on this head; I added a reply because the same predicate also misses external status transitions back to Active, not just first creation. That path starts charging token/time progress to the goal without giving the model the objective, so the accounting and the actual work can diverge.
Separately, the budget-limit steering de-dupe now resets when the same goal is marked active again, which can repeatedly inject the same budget-limited stop message across turns and spend more tokens after the goal is already over budget. CI is also red on this head: rust-ci fails argument-comment lint on the new token_usage(...) test calls, and Bazel still has failing Windows/macOS test jobs.
No description provided.