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
Hooks cut captured text before redaction, so a <private> block across the limit is stored #1600
Hooks shorten captured text before sending it, and the server redacts afterwards. stripPrivateData matches only a closed <private>...</private> block, so when the cut lands inside one, the opening tag and the secret after it are stored. Affected: task-completed (description, 2000), post-tool-failure (input and error, 4000), session-end (transcript prompts, 8000), subagent-stop (reply, 4000; #1599 also fixes it), and truncateCaptureOutput in src/hooks/_capture-filter.ts, which post-tool-use applies to tool output (8000). The same order keeps the start of a token the cut lands in, such as ghp_ followed by fewer than 36 characters, which its pattern no longer matches.
Reproduced through plugin/scripts/*.mjs, with <private>secret starting just before each limit and </private> after it, and the observe payload run through scrubRecord: every site above stores the secret.
src/hooks/stop.ts already redacts the whole reply before shortening it.
Expected: hooks redact captured text before cutting it to their length limit, so a <private> block or a token that the cut lands in is not stored, and text within the limit is sent unchanged.
Activity