feat(agent): HMAC tool execution receipts for hallucination detection#4943
Closed
singlerider wants to merge 3 commits intozeroclaw-labs:masterfrom
Closed
feat(agent): HMAC tool execution receipts for hallucination detection#4943singlerider wants to merge 3 commits intozeroclaw-labs:masterfrom
singlerider wants to merge 3 commits intozeroclaw-labs:masterfrom
Conversation
20 tasks
Every tool execution produces a cryptographic HMAC-SHA256 receipt proving the tool actually ran. The LLM cannot forge valid receipts because it never sees the ephemeral session key. New module src/agent/tool_receipts.rs with ReceiptGenerator. Wired through tool_execution.rs, loop_.rs, and channels/mod.rs. Opt-in via config: agent.tool_receipts.enabled and agent.tool_receipts.show_in_response. Leak detector updated to exempt zc-receipt- tokens from entropy redaction. Closes zeroclaw-labs#4830 Supersedes zeroclaw-labs#4831, zeroclaw-labs#4921
687fc2c to
439e772
Compare
…nt fixes Add missing receipt_generator and collected_receipts args to 24 test call sites, remove stray bool args from 2 cost-tracking tests, fix stale struct fields in channel test constructions, and resolve clippy warnings (collapsible_if, match_same_arms, type_complexity, needless_lifetimes, struct_excessive_bools, unused variable). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The cherry-picked zeroclaw-labs#4927 changed handle_webhook to use run_gateway_chat_with_tools, which calls process_message and bootstraps a full agent from Config — ignoring the pre-configured state.provider. This breaks when Config::default() lacks an API key. Revert to run_gateway_chat_simple which correctly uses state.provider. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Closing in favor of #5168 |
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.
Summary
masterzc-receipt-...) that proves the tool ran with specific arguments and produced a specific output. Receipts are unforgeable by the LLM. Optionally appended to user-visible responses.src/agent/tool_receipts.rs(new),src/agent/tool_execution.rs,src/agent/loop_.rs,src/channels/mod.rs,src/config/schema.rs,src/security/leak_detector.rs,docs/security/tool-receipts.md(new).Label Snapshot
Change Metadata
src/agent/tool_receipts.rs,src/agent/tool_execution.rsLinked Issue
Validation Evidence
Security Impact
Privacy and Data Hygiene
Compatibility/Migration
tool_receipts.enabled = truein configHuman Verification
show_in_response = trueappends receipts to channel messageSide Effects/Blast Radius
ToolReceiptsConfigin agent configzc-receipt-tokensRollback Plan
Revert the commit — removes receipt module and config.
Risks and Mitigations
None — opt-in feature, disabled by default.