Repository navigation
fix(server): a webhook prompt that names no request data still receives the request - #143
Merged
nullStack65 merged 2 commits intoNov 20, 2026
Conversation
…es the request
A webhook task's turn only sees the rendered prompt. When the prompt
used no {{body}}, {{headers}}, {{query}} or {{request}} placeholder, the
payload stayed in the delivery log and the agent ran without it. The
request is now appended, framed as untrusted data with credentials
redacted, and cut at 32,000 characters with a truncation marker.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
The appended request was cut at a fixed 32,000 characters, so a prompt already near the 120,000 character send cap was pushed over it and the run refused, and the cut could land between the halves of a surrogate pair. The copy now gets only the room the prompt leaves, and steps back off a trailing high surrogate. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A webhook task's triggered turn only receives the rendered prompt. When the prompt used none of the
{{body}},{{headers}},{{query}}or{{request}}placeholders, the incoming payload never reached the agent: it stayed inscheduled_task_webhook_deliveriesand had to be read out of the database by hand. The default prompt includes{{body}}, so only custom prompts hit this.Change
renderWebhookPromptnow appends the request when the prompt names nothing from it. The copy is framed in the same<webhook-data-…>tags as placeholder values, with credential headers and query parameters redacted, and cut at 32,000 characters with a[truncated]marker so it stays under the 120,000 character send cap. A prompt that uses placeholders is unchanged, including one whose placeholder resolved empty. The raw rendering used for dedupe keys is unchanged.The editor hints and the scheduled tasks docs say the request is appended in that case.
Scope
Bug fix for an obvious gap: the delivery log is the only other place the payload exists, and the turn cannot see it. No issue filed.
Verification
vp test run src/scheduledTasks/webhookTemplate.test.tsinapps/server: 14 passed, including the new cases for appending, for not appending when a placeholder is present or resolved empty, and for the truncation marker.effect-tsgo tsrs --noEmitfor the server and contracts packages exited 0 (only pre-existing suggestions). Not checked: the web and mobile UI rendering of the hint text, and a live webhook delivery against a running server.Deploy: none
Model and harness: grok/grok-4.7 through Claude Code.
🤖 Generated with Claude Code