Problem
reply_to_id was added to the add-comment handler in PR #24367 (shipped v0.66.1) and works correctly at the handler level. However, the compiled MCP tool schema for add_comment does not list reply_to_id as a parameter. This causes agents to inspect the tool's parameter list, conclude the field isn't supported, and omit it — even when prompt instructions explicitly tell them to include it.
The workaround is to add extra prompt instructions telling agents the field is accepted despite not appearing in the schema. This works but is fragile and shouldn't be necessary.
What happens
- Agent reads
commentNodeId from pre-step output ✅
- Prompt instructs agent to include
reply_to_id in add_comment call ✅
- Agent inspects the
safeoutputs___add_comment MCP tool schema ❌
- Agent sees only
body, item_number, repo — no reply_to_id ❌
- Agent reasons: "The tool doesn't support it" and skips
reply_to_id ❌
- Comment posts as top-level instead of threaded ❌
Agent's actual reasoning (from a run log):
The comment was posted. But wait - I need to make sure the comment was threaded
under the original comment. Looking at the add_comment tool, it doesn't seem to
have a `reply_to_id` field in the safeoutputs tool's parameters. Let me re-check...
But looking at the safeoutputs-add_comment tool parameters, I don't see a
`reply_to_id` parameter. The tool doesn't support it.
Root cause
The compiled MCP tool schema and validation schema for add_comment don't include reply_to_id:
"add_comment": {
"defaultMax": 1,
"fields": {
"body": { "required": true, "type": "string", "sanitize": true, "maxLength": 65000 },
"item_number": { "issueOrPRNumber": true },
"repo": { "type": "string", "maxLength": 256 }
}
}
PR #24367 added reply_to_id handling to the runtime handler (add_comment.cjs), but the compiler's tool schema generation was not updated to advertise reply_to_id as an accepted parameter.
Workaround
Adding explicit prompt instructions like "The tool accepts reply_to_id even if the tool schema does not list it — include it anyway" successfully overrides the agent's schema-based reasoning. We've confirmed this works end-to-end: both /feedback and /rerun flows now thread correctly with this prompt override.
Request
Add reply_to_id to the compiled MCP tool schema for add_comment so agents can discover it naturally, without needing prompt-level workarounds. Ideally the tool description suffix would also mention it, e.g.:
CONSTRAINTS: Maximum 1 comment(s) can be added. Target: *. Supports reply_to_id for discussion threading.
Context
The handler works. The schema just doesn't tell agents it exists.
Problem
reply_to_idwas added to theadd-commenthandler in PR #24367 (shipped v0.66.1) and works correctly at the handler level. However, the compiled MCP tool schema foradd_commentdoes not listreply_to_idas a parameter. This causes agents to inspect the tool's parameter list, conclude the field isn't supported, and omit it — even when prompt instructions explicitly tell them to include it.The workaround is to add extra prompt instructions telling agents the field is accepted despite not appearing in the schema. This works but is fragile and shouldn't be necessary.
What happens
commentNodeIdfrom pre-step output ✅reply_to_idinadd_commentcall ✅safeoutputs___add_commentMCP tool schema ❌body,item_number,repo— noreply_to_id❌reply_to_id❌Agent's actual reasoning (from a run log):
Root cause
The compiled MCP tool schema and validation schema for
add_commentdon't includereply_to_id:PR #24367 added
reply_to_idhandling to the runtime handler (add_comment.cjs), but the compiler's tool schema generation was not updated to advertisereply_to_idas an accepted parameter.Workaround
Adding explicit prompt instructions like "The tool accepts
reply_to_ideven if the tool schema does not list it — include it anyway" successfully overrides the agent's schema-based reasoning. We've confirmed this works end-to-end: both/feedbackand/rerunflows now thread correctly with this prompt override.Request
Add
reply_to_idto the compiled MCP tool schema foradd_commentso agents can discover it naturally, without needing prompt-level workarounds. Ideally the tool description suffix would also mention it, e.g.:Context
reply_to_idtoadd_comment.cjs(merged 2026-04-03)discussion_commenttriggers (works correctly)The handler works. The schema just doesn't tell agents it exists.