Skip to content

feat: wire goal extension tools to the dedicated goal store#23685

Merged
jif-oai merged 1 commit into
mainfrom
jif/goal-state-management
May 20, 2026
Merged

feat: wire goal extension tools to the dedicated goal store#23685
jif-oai merged 1 commit into
mainfrom
jif/goal-state-management

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

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

Why

ext/goal already had the tool specs and contributor wiring for /goal, but the installed tools still depended on a placeholder backend that always errored. That meant the extension could not actually own goal persistence even though the dedicated thread_goals store already exists.

This change wires the extension tools directly to the dedicated goal store so the extension can create, read, and complete goals against real state instead of falling back to host-side placeholders.

What changed

  • make install_with_backend(...) require Arc<codex_state::StateRuntime> so goal storage is always available when the extension is installed
  • remove the unused no-backend/public backend abstraction from ext/goal and have the tool executors talk directly to StateRuntime
  • map thread_goals rows into the existing protocol response shape for get_goal, create_goal, and update_goal
  • preserve current thread-list behavior by filling an empty thread preview from the goal objective when a goal is created through the extension path
  • add integration coverage for the installed tool surface, including successful goal creation and duplicate-create rejection

Testing

  • cargo test -p codex-goal-extension

@jif-oai jif-oai changed the title feat: goal state management feat: wire goal extension tools to the dedicated goal store May 20, 2026
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 20, 2026

@codex review

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: 4ca3a3da1b

ℹ️ 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/extension.rs
Comment thread codex-rs/ext/goal/src/tool.rs
Comment thread codex-rs/ext/goal/src/tool.rs
Comment thread codex-rs/ext/goal/src/tool.rs
Comment thread codex-rs/ext/goal/src/extension.rs
@jif-oai jif-oai merged commit b555dd5 into main May 20, 2026
31 checks passed
@jif-oai jif-oai deleted the jif/goal-state-management branch May 20, 2026 12:44
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 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.

1 participant