You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: docs list built-in tool as patch, source registers it as apply_patch #19941
The Tools documentation lists a built-in tool called patch in the Built-in section. The actual registered tool ID in the source is apply_patch. This causes plugin hooks that check input.tool === "patch" to silently never fire — no error, no warning.
Additionally, the docs don't describe the apply_patch args shape or path format, which differs significantly from edit/write.
"tool.execute.before": async(input,output)=>{if(input.tool==="patch"){/* never runs */}}
gets silent failure. The correct name is "apply_patch".
apply_patch args shape (undocumented)
apply_patch has a different args shape than edit/write and the docs don't mention it:
// edit / write — filePath is directly available:output.args.filePath// absolute path// apply_patch — no filePath; paths are embedded in patchText as relative paths:output.args.patchText// must parse marker lines to extract paths
Marker lines in patchText (paths are relative to project root):
The issue does not use one of the required issue templates (Bug Report, Feature Request, or Question). Please re-submit or edit this issue using the appropriate template structure.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
changed the title [-]Plugin hook tool name mismatch: docs say `patch`, source registers `apply_patch`; plus undocumented model-conditional tool substitution[/-][+]Bug: docs list built-in tool as `patch`, source registers it as `apply_patch`[/+]on Mar 29, 2026
Thank you for updating the issue! It now includes a clear description, reproduction steps, version info, and OS details. Everything looks good — the compliance flag has been removed.
Activity
github-actions commentedon Mar 29, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
[-]Plugin hook tool name mismatch: docs say `patch`, source registers `apply_patch`; plus undocumented model-conditional tool substitution[/-][+]Bug: docs list built-in tool as `patch`, source registers it as `apply_patch`[/+]github-actions commentedon Mar 29, 2026
Thank you for updating the issue! It now includes a clear description, reproduction steps, version info, and OS details. Everything looks good — the compliance flag has been removed.
yejiming commentedon Mar 30, 2026
I'd like to work on this