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
schedule_task never tells agents how a webhook run's prompt reads the request #41288
The webhook schedule of schedule_task documents how a run's prompt reads the incoming request:
// packages/contracts/src/scheduledTask.ts"Run per webhook request. Prompt can use {{body.path}}, {{headers.name}}, {{query.name}}, {{body}}, {{request}}."
Agents never see that text. advertisedJsonSchema merges the schedule's tagged union into one object (mergeTaggedObjects in apps/server/src/mcp/advertisedJsonSchema.ts), and the merge drops each branch's own description. The webhook branch is the only one with a description, so its template syntax is lost.
As a result, an agent asked for "a task that runs on every GitHub push and reviews the pushed branch" writes a prompt like "Take the branch from the webhook body", with no {{body.ref}}. Runs from that prompt never get the branch.
Diagnosis
mergeTaggedObjects builds the tag property as { type: "string", enum: [...] } and copies the other properties, but never carries a branch's description anywhere. This is still true on main (58e309e).
Steps to reproduce
Ask an agent in T3 Code to "create a task that runs whenever GitHub sends us a push webhook; each run should review the branch that was pushed."
Look at the schedule_task call. Its prompt does not use {{body.ref}} or any {{…}} placeholder.
Dump the advertised MCP tool list. The text "Prompt can use {{body.path}}…" is not in it.
Version
Present on main as of 58e309e and on 0.1.12-nightly.20261123.5124.
Evidence
PR #28147 fixed this. When the branches are merged, each branch's description moves onto the tag property as <tag value>: <description>. It came with a fail-first unit test and an eval case: webhook-prompt-uses-body-template went from 0/4 to 4/4 on both Claude Sonnet 5.5 and GPT-6.1 Sol, and the controls and the full eval suite showed no regressions. It stalled on the Agent context budget check: the fix adds 137 bytes to the tool list, which needs the agent-context-increase label from a maintainer. I'm closing it to stay within the 3-open-PR limit, and leaving this issue so the bug is tracked. The branch is still there if a maintainer wants to take it over or relabel it.
Activity