Skip to content

atomic git push provenance gate refuses every change recorded by the agent hooks (no attestation until SessionEnd, then signer "unknown") #330

Open

Description

@Zaba505

Summary

Changes recorded by the Claude Code Stop hook ("managed-session" changes) can't be published with atomic git push, even with --no-push:

  • While the session is still open: no same-session attestation for session <id>.
  • After SessionEnd: an attestation exists, but the gate rejects it with "signer did:atomic:<id> is unknown (not configured)". That DID is the user's own default identity, the one that delegated the agent identity the hooks sign as.

I couldn't find a way to configure a trusted signer:

  • atomic git push --help has no trust option.
  • Neither .atomic/config.toml nor ~/.atomic/config.toml has trust settings.
  • The refusal itself says "RFC section 19 Q4 … is unresolved: only explicitly configured signers satisfy the trust check".

So in practice, no change recorded by the hooks can be pushed. By contrast, a change recorded by hand with atomic record during a session pushes with only an advisory warning ("Local provenance verification is advisory …").

Environment

  • atomic 0.21.0, Linux x86_64
  • Git repo imported into atomic with atomic git import
  • Hooks: atomic agent hooks claude-code <verb>, the commands atomic agent enable installs
  • Agent identity created with atomic identity agent create --agent-type claude-code --local and selected with atomic agent identity set

Reproduction

The script uses an isolated $HOME and a temp repo. It simulates a Claude Code session by piping hook JSON into the hook verbs. I first hit this with real Claude Code sessions, and the simulated run gives the same errors.

#!/usr/bin/env bash
# Repro (atomic 0.21.0): `atomic git push` refuses every change recorded by the Claude Code
# Stop hook: first "no same-session attestation", then after SessionEnd "signer ... unknown".
# Needs atomic, git, jq. Uses an isolated $HOME and temp repo. The Claude Code session is
# simulated by piping hook JSON into `atomic agent hooks claude-code <verb>`, the commands
# that `atomic agent enable` installs.
set -u
atomic --version
export HOME="$(mktemp -d)"; cd "$(mktemp -d)"
run()  { printf '\n$ %s\n' "$*"; "$@"; echo "[exit $?]"; }
hook() { jq -nc --arg sid "$SID" --arg cwd "$PWD" --arg tr "$HOME/t.jsonl" --argjson x "$2" \
           '{session_id:$sid, cwd:$cwd, transcript_path:$tr} + $x' | atomic agent hooks claude-code "$1"
         echo "[hook $1 exit $?]"; }

# user identity + delegated claude-code agent identity that the hooks sign as
atomic identity new repro -e repro@example.invalid --set-default
atomic identity agent create repro-claude --agent-type claude-code --local --expires 1d
atomic agent identity set repro+repro-claude

git init -q -b main repo && cd repo
git config user.name repro && git config user.email repro@example.invalid
echo hello > README.md && git add -A && git commit -qm init
atomic git import --no-vault

# one agent turn that edits a file; the Stop hook records it
SID="$(cat /proc/sys/kernel/random/uuid 2>/dev/null || uuidgen)"; : > "$HOME/t.jsonl"
hook session-start      '{"hook_event_name":"SessionStart","source":"startup"}'
hook user-prompt-submit '{"hook_event_name":"UserPromptSubmit","prompt":"edit the readme"}'
echo world >> README.md
hook stop               '{"hook_event_name":"Stop","stop_hook_active":false}'
run atomic log -n 1 -f short                  # the hook-recorded change

run atomic git push --no-push -b feature      # refused: no same-session attestation
hook session-end        '{"hook_event_name":"SessionEnd","reason":"prompt_input_exit"}'
run atomic agent attest                       # an attestation now exists
run atomic identity show repro                # this ID is the "unknown" signer below
run atomic git push --no-push -b feature      # refused: signer unknown (not configured)

Actual results

IDs are replaced with placeholders.

Push while the session is open:

$ atomic git push --no-push -b feature
✗ publication refused at Git ref export: trusted provenance gate found 1 managed-session change(s) with incomplete evidence (of 3 checked):
change <C>: no same-session attestation for session <S>
[exit 3]

Same push after session-end: atomic agent attest now reports 1 attestation(s) covering changes in this view, but the push is still refused:

$ atomic git push --no-push -b feature
✗ publication refused at Git ref export: trusted provenance gate found 1 managed-session change(s) with incomplete evidence (of 3 checked):
change <C>: attestation <A> (session <S>) signer 'did:atomic:<ID>' is unknown (not configured) under the configured trust policy and cannot satisfy a publication gate
limitation: attestation verification is key-provider-dependent (session MAC key or DID signer resolver); without the key in context the evidence is unverifiable and fails closed, and boundary, outcome, binding and provenance roots are not yet covered by the signature (CB-12A review F3)
limitation: fabricated commit-time capture evidence is not detectable at this gate (CB-12A review F2)
limitation: full boundary/manifest/ref/operation ancestry and repair leases are not yet enforced (CB-12A review F4/F5)
limitation: RFC section 19 Q4 (open-source trust default) is unresolved: only explicitly configured signers satisfy the trust check; no default trust is granted
limitation: this verdict enforces configured policy over available evidence; content correctness is verified independently of signatures
[exit 3]

<ID> is exactly the ID: that atomic identity show repro prints. That's the default user identity that delegated repro+repro-claude.

Expected

  • A change recorded by the agent hooks under a valid, unexpired delegation from the user's own default identity should be publishable.
  • If explicit trust configuration is intended, the refusal should say how to set it up.
  • If the attestation is only meant to be written at SessionEnd, the in-session refusal should say so ("end the session first").

As it stands, an agent can never publish its own work during its session, and hook-recorded work can't be published even after the session ends. Hand-recording, which carries less provenance, is the only path the gate doesn't block.

Questions

  • How is the publication gate's trust policy meant to be configured in 0.21.0?
  • Is it by design that the session attestation is only written at SessionEnd?

Activity

  1. Zaba505 commented on Nov 11, 2026

    @Zaba505
    Author

    The same refusal also blocks atomic insert. So a hook-recorded change can't reach a shared view by either route: atomic git push refuses it, and so does promotion into main.

    To reproduce, add this to the end of the script above:

    # promoting the change into the shared view is gated too
    DRAFT="$(atomic status 2>/dev/null | sed -n 's/^On view //p')"
    run atomic view switch main
    run atomic insert view "$DRAFT"
    run atomic log --view main -n 1 -f short
    $ atomic insert view <draft>
    ✗ atomic:CHANGE_REJECTED: publication refused at triage promotion: trusted provenance gate found 1 managed-session change(s) with incomplete evidence (of 3 checked):
    change <C>: attestation <A> (session <S>) signer 'did:atomic:<ID>' is unknown (not configured) under the configured trust policy and cannot satisfy a publication gate
    [exit 1]
    

    main is unchanged afterwards.

    This also breaks landing a draft through a Git PR. The PR's commit can be squash-merged and brought back with atomic git import --incremental, and that part works. But the native hook-recorded change then can't be inserted into main to link it, so its provenance stays stranded in the draft view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions