Commit 68cb0fc
fix(outbound): sanitize message.send arguments to prevent runtime scaffolding leaks
Weak tool-calling models (MiniMax, Kimi, small Ollama models) can
verbatim-echo the runtime Delivery: hint and Conversation info /
Sender (untrusted metadata) JSON envelopes into message.send tool
arguments. The runtime forwarded them unfiltered to channel adapters,
leaking internal metadata into real human conversations.
Apply the existing stripInboundMetadata sanitizer to outbound
message.send arguments so the same sentinels stripped from inbound
prompts are also stripped from outbound tool-call text before delivery.
Closes #89100
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 2c0e835 commit 68cb0fc
2 files changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
983 | 984 | | |
984 | 985 | | |
985 | 986 | | |
986 | | - | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
987 | 990 | | |
988 | 991 | | |
989 | 992 | | |
| |||
0 commit comments