Skip to content

[wip] goal shift#23858

Merged
jif-oai merged 6 commits into
mainfrom
jif/goal-2
May 26, 2026
Merged

[wip] goal shift#23858
jif-oai merged 6 commits into
mainfrom
jif/goal-2

Conversation

@jif-oai

@jif-oai jif-oai commented May 21, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@jif-oai jif-oai requested a review from a team as a code owner May 21, 2026 11:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread codex-rs/ext/goal/src/runtime.rs Outdated
Comment on lines +132 to +134
let objective_changed = previous_goal
.as_ref()
.is_some_and(|previous_goal| previous_goal.objective != goal.objective);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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.

@usgenes39-dotcom usgenes39-dotcom left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread codex-rs/ext/goal/src/accounting.rs Outdated
@jif-oai jif-oai merged commit 7f9ab6e into main May 26, 2026
30 checks passed
@jif-oai jif-oai deleted the jif/goal-2 branch May 26, 2026 09:22
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants