Skip to content

Commit a51ff0a

Browse files
fix(server): agent instructions point PR work at the pull_request tools, not gh or cafe
Claude Code defers MCP tools, so the agent sees only their names until it searches. Without a line in the always-loaded instructions, Opus and Sonnet ran gh pr checks and gh pr list instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 22ab0b4 commit a51ff0a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"claudeSystemAppendBytes": 5597,
3-
"codexAdditionalContextBytes": 7327,
2+
"claudeSystemAppendBytes": 5729,
3+
"codexAdditionalContextBytes": 7459,
44
"mcpToolListJsonBytes": 50947
55
}

‎packages/provider-core/src/server/runtimeInstructions.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** Session-invariant; harnesses with a native system-prompt append can carry it once per session. */
22
export const PULL_REQUEST_LINKING_INSTRUCTIONS = `<pull_request_linking>
3-
Link each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools do not link for you. If linking fails, say so. Skip PRs you only read or review, and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR <full URL>, head <SHA>, checks and reviews <state>. Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch.
3+
Link each PR you create, take over, or push to: link_pull_request, or link_pull_requests for several, full URL, every stack layer, as your next call. Host tools do not link for you. If linking fails, say so. Skip PRs you only read or review, and PRs named only as background. Call watch_pull_request when asked to monitor or babysit, or when work you were asked to do, such as a merge, still waits on checks or reviews, even after an earlier unwatch. Finish any needed branch update and push first, then watch and end your turn. Otherwise act now or hand back. Delegated children never watch, even if the brief says babysit. After PR work, a child's last line is: PR <full URL>, head <SHA>, checks and reviews <state>. Links and watches persist across pushes. For PR waits, no sleep, loops, gh --watch, Monitor or ScheduleWakeup. Before handback, call unwatch_pull_request on any PR you watch. To read, list, open, edit, reply on, or merge PRs, use the pull_request_* tools, not gh or cafe. pull_request_create links for you.
44
</pull_request_linking>`;
55

66
/** Omit model and effort when the harness manages them dynamically. */

0 commit comments

Comments
 (0)