0.10.0: session receipt on Stop hook - #12
Merged
Merged
Conversation
… session Churned users' sessions were 100% silent allows (retention analysis 2026-08-13): the hook governed a thousand calls and appeared to do nothing. The receipt is one systemMessage at session end — calls governed, anything flagged, shadow notices shown — deep-linked to the session's timeline in the console. Purely local counters (PostToolUse bumps ~/.acp/session-stats/, Stop reads + clears), no network on the Stop path, silent for tool-free sessions, stale files pruned. Counted only on a real server verdict: a call the gateway never saw is never claimed as governed. Refs gatewaystack-connect#606
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.
Retention play 2 (gatewaystack-connect#606, analysis 2026-08-13). At session end the hook prints one line:
[ACP] Session receipt: 214 tool calls governed · 3 shadow notices — review this session: https://cloud.agenticcontrolplane.com/sessions/<session_id>handleStopin govern.mjs~/.acp/session-stats/only on a real server verdict (a call the gateway never saw is never claimed as governed); Stop reads, prints, clears, and prunes week-old leftovers from crashed sessionsstop_hook_activeguard prevents double receipts; hostile session ids sanitized before filesystem uselib/receipt.mjswith contract tests (44/44 suite green, both handlers smoke-tested)🤖 Generated with Claude Code