Skip to content

Add goal model tools (3 / 5)#18075

Merged
etraut-openai merged 198 commits intomainfrom
goal-mode-3-tools
Apr 25, 2026
Merged

Add goal model tools (3 / 5)#18075
etraut-openai merged 198 commits intomainfrom
goal-mode-3-tools

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented Apr 16, 2026

Adds the model-facing goal tools on top of the app-server API from PR 2.

Why

Once goals are persisted and exposed to clients, the model needs a small, constrained tool surface for goal workflows. The tool contract should let the model inspect goals, create them only when explicitly requested, and mark them complete without giving it broad control over user/runtime-owned state.

What changed

  • Added get_goal, create_goal, and update_goal tool specs behind the goals feature flag.
  • Added core goal tool handlers that validate objectives and token budgets before mutating persisted state.
  • Constrained create_goal to create only when no goal exists, with optional token_budget only when a budget is explicitly provided.
  • Tightened the create_goal instructions so the model does not infer goals from ordinary task requests.
  • Constrained update_goal to expose only goal completion; pause, resume, clear, and budget-limited transitions remain user- or runtime-controlled.
  • Registered the goal tools in the tool registry and kept them out of review contexts where they should not appear.

Verification

  • Added tool-registry coverage for feature gating and tool availability.
  • Added core session tests for create/get/update behavior, duplicate goal rejection, budget validation, and completion-only updates.

Copy link
Copy Markdown
Contributor

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

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: 517f0434ea

ℹ️ 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/core/src/goals.rs
Comment thread codex-rs/core/src/goals.rs Outdated
Comment thread codex-rs/core/src/tools/handlers/goal.rs
Copy link
Copy Markdown
Contributor

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

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: ac6bda0da1

ℹ️ 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/core/src/tools/handlers/goal.rs
Comment thread codex-rs/core/src/tools/handlers/goal.rs
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai left a comment

Choose a reason for hiding this comment

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

Minor comments but lgtm

Comment thread codex-rs/tools/src/tool_config.rs
Comment thread codex-rs/core/src/goals.rs Outdated
Comment thread codex-rs/core/src/tools/handlers/goal.rs Outdated
Copy link
Copy Markdown
Contributor

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

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: cd26ff05dd

ℹ️ 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/core/src/session/turn_context.rs Outdated
Comment thread codex-rs/core/src/goals.rs
Copy link
Copy Markdown
Contributor

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

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: d85daa4572

ℹ️ 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/core/src/goals.rs Outdated
Comment thread codex-rs/core/src/goals.rs
Comment thread codex-rs/core/src/session/turn_context.rs Outdated
Base automatically changed from goal-mode-2-app-server to main April 25, 2026 03:53
@etraut-openai etraut-openai merged commit 32ace07 into main Apr 25, 2026
34 of 35 checks passed
@etraut-openai etraut-openai deleted the goal-mode-3-tools branch April 25, 2026 03:54
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 25, 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