Repository navigation
V6: Stop webhookChannel replies from echoing the transcript - #671
Merged
Merged
Conversation
…ole ExecutionResult Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LinuxDevil
force-pushed
the
v6-webhook-trim
branch
from
October 19, 2026 19:51
09625bc to
b053fee
Compare
Co-Authored-By: Claude Opus 5.5 <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.
Fixes audit finding SWE-3 (Vercel competitor audit, 2026-10-19).
What was wrong
webhookChannelreplied with the fullExecutionResult. A signed webhook call returned{"text":…,"messages":[{"role":"system","content":"<system prompt>"},…all prior turns…],"toolCalls":…,"usage":…,"stepUsage":…}, leaking the system prompt and whole transcript to the caller, and growing every turn.What changed
{ sessionId, text, finishReason, approval?, approvals? }, matchinghttpChannel. On an approval pause,approvalPromptis kept (documented behavior).fullResult: truerestores the previous body (wholeExecutionResult, plusapprovalPromptwhen paused).webhookChannel().Behavior change: webhook replies no longer include
messages,toolCalls,usage,stepUsageorapprovalIdby default. Consumers that read these must passfullResult: true, or read the approval id fromapproval.id.Doc wording for docs/channels.md (owned by V2): "The webhook channel replies with
{ sessionId, text, finishReason }(plusapproval/approvalPromptwhen the turn paused for approval). It never echoes the transcript or system prompt. PassfullResult: trueto receive the wholeExecutionResult; only do so when every caller is trusted with the system prompt and conversation."Tests
messages/stepUsage/usage/toolCallsand no system prompt text, has sessionId/text/finishReason;fullResult: truereturns messages incl. the system prompt; approval-pause test now checksapproval+approvalPromptand nomessages.npx tsc --noEmit,typecheck:tests,lintclean;vitest run src/channels247 passed. Fulltest:coveragehad 57 environment failures (timeouts under load, missing packages dist, CHANGELOG alpha.24 baseline), none in channels, so no full coverage file andfallowcould not be run meaningfully.Changelog: webhookChannel replies with
{ sessionId, text, finishReason, approval? }by default instead of the full ExecutionResult (no transcript or system prompt echo); opt in withfullResult: true.🤖 Generated with Claude Code