Skip to content

fix(server): a webhook prompt that names no request data still receives the request - #143

Merged
nullStack65 merged 2 commits into
release/native-0.1.10from
fix/webhook-payload-appended-by-default
Nov 20, 2026
Merged

nullStack65 merged 2 commits into
release/native-0.1.10from
fix/webhook-payload-appended-by-default

Conversation

@nullStack65

Copy link
Copy Markdown
Owner

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 in scheduled_task_webhook_deliveries and had to be read out of the database by hand. The default prompt includes {{body}}, so only custom prompts hit this.

Change

renderWebhookPrompt now 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.ts in apps/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 --noEmit for 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

…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>
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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>
@nullStack65
nullStack65 merged commit 535c7df into release/native-0.1.10 Nov 20, 2026
3 checks passed
@nullStack65
nullStack65 deleted the fix/webhook-payload-appended-by-default branch November 20, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant