Repository navigation
Description
Problem
An analyst needs to distinguish a requested tool call, a permission decision and a harness-reported result, then link the observations to the same invocation. Session-level correlation and tool_called alone do not establish that relationship or independently prove execution.
Matthias raised this as the first priority in his review of Agentmetry's investigation evidence.
What the current code already does
Reviewed source at c723ec29ba83c18e7499ed1ff330b0a97b5267b8, not a new runtime validation:
- Claude PostToolUse mapping already derives success or failure. Other adapters also handle some post-tool observations. The gap is not a complete absence of result handling.
- These Claude observations retain session correlation, but not the harness's tool-use ID. Canonical external tool construction has no common invocation/result metadata contract.
- The default host_id implementation returns the hostname. That is not an independently established EDR device identifier.
Bounded first increment
Design an additive lifecycle contract for one documented hook adapter first, then extend only where the source actually supplies the fields. Keep existing action fields and their meanings compatible with existing consumers.
- Preserve the source invocation ID and distinguish request, permission decision and reported result observations. Scope joins by source, session and invocation. Retries or attempts must not silently overwrite one another.
- Preserve available structured exit code, error classification and duration, with the observation source and measurement semantics. Missing fields stay unknown. Missing error information must not itself establish success. Do not capture response bodies or arbitrary error text by default.
- Separate observed permission decisions from inferred ones. A pre-hook allow does not establish execution. A post-hook report does not establish independent verification or prove which person operated an account.
- Leave a request with no matching result unresolved. Do not guess a match from tool name, input hash, nearest timestamp or session membership when a source ID is absent.
Acceptance criteria
- Record the adapter, documented version, available source fields and gaps. Distinguish documentation review, synthetic payload tests and any real-session validation.
- Synthetic request, permission and result observations retain the same source invocation ID through hook normalization, HTTP ingest and canonical storage.
- Concurrent calls of the same tool, retries, duplicate observations, out-of-order arrival and an unmatched result cannot be silently joined to the wrong invocation.
- Denied requests, explicit failures, missing results and results without status remain distinguishable. Unknown stays unknown.
- Available structured result fields survive ingest. Unsupported fields remain absent. Duration provenance and units are documented.
- The Tenzir mapping preserves the added context, with an example query that joins observations without promoting reported identity or outcome to independent fact. Coordinate consumer changes before shipping.
- Existing events and downstream contracts remain compatible. Frozen detection files are untouched and the ruleset fingerprint is checked during implementation validation.
- Validation uses private synthetic inputs in an isolated, unhooked environment. No model run, live trail test or public validation evidence is required by this issue.
Corroboration design checkpoint
Before expanding collection, specify which independent log source could join on each proposed key: stable installation or host identity, actual agent process identity, process start time and cwd. Include provenance, availability and privacy implications. A hook process PID is not automatically the agent PID, a local installation ID is not automatically an EDR device ID, and PID alone is reusable.
Treat raw cwd collection and any change to existing host_id semantics as separate reviewed decisions. This issue does not authorize new default capture, an EDR integration, a fleet feature or a dashboard expansion.
Related work and exclusions
- Tool responses are not recorded, so the trail cannot see how much data moved #45 covers response size and digest metadata. This increment does not require recording tool output or prove how many bytes reached a destination.
- Events carry no project, so one trail mixes every repo on the machine #37 covers workspace context and its path privacy considerations.
- schema: make
inferreda structured field, not a reason-string prefix #131 covers structured observed versus inferred approval metadata. - fleet: require HMAC argument hashing on fleet installs #314 covers fleet HMAC requirements. Default indicator capture and default HMAC/key lifecycle remain separate proposals, not prerequisites for invocation linkage.
This is a design and implementation backlog item, not a claim that these guarantees have been implemented or tested.
Activity
blitzcrieg1 commentedon Nov 11, 2026
Optional corroboration example: Hayabusa and Windows logs
Proposal for the independent-log design checkpoint in #412. This is a concept and future validation plan, not an implemented or tested integration.
Purpose
For one Agentmetry tool invocation, show the request, permission decision and harness-reported result alongside a separately collected Windows observation. Make the matching basis inspectable. Windows process creation can corroborate that a process started; it does not establish which person intended an action, successful command completion or successful exfiltration.
Keep Hayabusa external. Start with explicitly selected exported files and a proposed sidecar evidence manifest, without installing a collector, importing arbitrary logs into the live trail or adding a dashboard section.
Source and availability
Hayabusa's output profiles include timestamp, computer, channel, event ID and record ID, with some profiles retaining source EVTX references and additional event fields. These are output-profile capabilities, not a guarantee that a particular log contains agent process identity or a matching result.
Its analysis documentation also cautions against treating the Windows
Computerfield as a reliable machine identifier. Preserve the acquisition-to-host association separately.Record the exact Hayabusa version/ref, rules revision, selected command, profile, filters and timezone during validation. Recheck their compatibility before execution. Retain the underlying Windows records: a filtered detection timeline is not a complete process inventory, and no detection does not establish no execution.
Proposed evidence references
If #412 cannot supply a defensible link to the observed process, stop at a documented gap. The first outcome can be "not yet correlatable". Do not manufacture a process GUID or infer a match from hostname, tool name, command similarity or nearest timestamp.
Bounded future validation
Scope and sequencing
First produce the evidence contract and one bounded comparison. Decide whether an importer or investigation UI is justified only after that comparison is useful. No default capture changes, automatic alert promotion, new detection rule, bundled Hayabusa runtime or fleet feature. This proposal does not expand the initial #412 implementation scope.
Read-only research used Hayabusa source ref
3a1767eace5f5dd06a75970a6b945de03eeee1d9. No runtime validation has been performed for this proposal. Future raw results remain private, with no public validation claims added automatically.blitzcrieg1 commentedon Nov 26, 2026
Closing as addressed by #445 (shipped in 0.14.0): session tree events now link Claude requests and reported results by the native invocation ID within their source and session, with unlinked approvals and ambiguous results kept visible and a guard against same-hash approval collisions. See docs/claude-invocation-evidence.md and tests/test_session_tree.py. The Hayabusa/Windows-log corroboration in the last comment is a separate design idea; happy to track it as its own issue if you want it.