mirror of
https://github.com/openai/codex.git
synced 2026-11-09 00:39:32 +00:00
Add goal model tools (3 / 5) (#18075)
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.
This commit is contained in:
1 parent
6c874f9b34
commit
32ace07ac5
14 files changed
+975
No files matched your search
@@ -6,6 +6,7 @@ mod agent_tool;
|
||||
mod apply_patch_tool;
|
||||
mod code_mode;
|
||||
mod dynamic_tool;
|
||||
mod goal_tool;
|
||||
mod image_detail;
|
||||
mod json_schema;
|
||||
mod local_tool;
|
||||
@@ -51,6 +52,12 @@ pub use code_mode::create_wait_tool;
|
||||
pub use code_mode::tool_spec_to_code_mode_tool_definition;
|
||||
pub use codex_protocol::ToolName;
|
||||
pub use dynamic_tool::parse_dynamic_tool;
|
||||
pub use goal_tool::CREATE_GOAL_TOOL_NAME;
|
||||
pub use goal_tool::GET_GOAL_TOOL_NAME;
|
||||
pub use goal_tool::UPDATE_GOAL_TOOL_NAME;
|
||||
pub use goal_tool::create_create_goal_tool;
|
||||
pub use goal_tool::create_get_goal_tool;
|
||||
pub use goal_tool::create_update_goal_tool;
|
||||
pub use image_detail::can_request_original_image_detail;
|
||||
pub use image_detail::normalize_output_image_detail;
|
||||
pub use image_detail::sanitize_original_image_detail;
|
||||
|
||||
Reference in new issue
Block a user