apply_patch tool is documented in system prompt but not registered as an available function
What version of the Codex App are you using (From “About Codex” dialog)?
26.623.5546.0
What subscription do you have?
Plus
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What issue are you seeing?
The apply_patch tool is mentioned in the agent's system prompt as an available tool for editing files:
"Use theapply_patchtool to edit files (NEVER tryapplypatchorapply-patch, onlyapply_patch)"
However, when inspecting the actual available tool/function list for the agent session, apply_patch is not present. The agent only has 22 tools available (shell_command, update_plan, view_image, multi_agent_v1__, mcp__node_repl__, codex_app__*, get_goal, create_goal, update_goal, web_search), none of which is apply_patch.
This means the agent cannot apply code patches directly and must fall back to shell commands (e.g., PowerShell/PowerShell) to modify files, which is less precise and more error-prone than a structured patch tool.
What steps can reproduce the bug?
- Start a Codex session (any model)
- Ask the agent: "请列出你当前所有可用的工具/函数"
- Observe that
apply_patchis not in the list - Alternatively, ask the agent to use
apply_patchto edit a file - The agent will report that the tool is not available in its function list
Note: The system prompt explicitly instructs the agent to use apply_patch, but the tool binding is missing from the actual function injection.
What is the expected behavior?
The apply_patch tool should be registered and available in the agent's function list, matching what the system prompt documents.
The agent should be able to call apply_patch with a structured patch format to apply precise code changes to files, rather than falling back to raw shell commands.
Additional information
Environment:
- Codex Desktop App version: 26.623.5546.0
- Platform: Windows 10 (19045) x64
- Agent model: gpt-5.3-codex (confirmed, same issue likely applies to all models)
Available tools observed (22 total): shell_command, list_mcp_resources, list_mcp_resource_templates, read_mcp_resource, update_plan, request_user_input, view_image, multi_agent_v1__close_agent, multi_agent_v1__resume_agent, multi_agent_v1__send_input, multi_agent_v1__spawn_agent, multi_agent_v1__wait_agent, mcp__node_repl__js, mcp__node_repl__js_add_node_module_dir, mcp__node_repl__js_reset, get_goal, create_goal, update_goal, codex_app__load_workspace_dependencies, codex_app__navigate_to_codex_page, codex_app__read_thread_terminal, web_search
Missing: apply_patch