Skip to main content
View Markdown ↗

Copy this page

Select and copy the Markdown below, then paste it into your LLM.

On this page

agent-session attestor

agent-session records one checkpoint of a coding-agent session: it started, named its ticket, waited, dispatched work to another machine, got the result back, claimed it was done, or ended. A harness hook (Claude Code, Codex and others) calls cilock at each checkpoint, and the agent's principal signs the record. The timestamp authority dates it.

Nameagent-session
Predicate typehttps://aflock.ai/attestations/agent-session/v0.1
Lifecycleprematerial
Default binary?No
Categoryci-context (primary)
Recommended traceoff — no syscall tracing needed
Auto-attaches when
  • preenv_set: CILOCK_AGENT_SESSION

The facts in this box are generated from the CI/lock binary's own catalog (cilock tools list). Do not hand-edit — run npm run gen:catalog.

Validated invocation

cilock attest --step agent-session -a agent-session \
  --attestor-agent-session-checkpoint input-bound \
  --attestor-agent-session-session 0193b2c4-1a2b-7c3d-8e4f-5a6b7c8d9e0f \
  --attestor-agent-session-tier hooks \
  --attestor-agent-session-adapter claude-code \
  --attestor-agent-session-input prompt=github:testifysec/judge#22919

What gets captured

  • checkpoint: one of start, input-bound, waiting, resumed, dispatch, joined, done-claimed, end.
  • session: cilock's session id, the harness's session id, and the parent session for a spawned one. Each is a lowercase UUID.
  • capture: the tier (hooks, plugin, proxy, launcher, remote-node, vendor-api, mcp) and the adapter name.
  • inputs: tickets or design docs the session named, each as a reference (github:owner/repo#N, linear:KEY-N, jira:KEY-N, design:<path>@<blob sha>) with where it was read (prompt, explicit, branch).
  • waitingOn (for waiting) and job (for dispatch and joined).
  • promptDigests: salted SHA-256 digests of human prompts. Never the text.
  • observedAt and a fixed caveat.

Why this shape

Every field comes from the agent's own harness, so the record can say what the session claimed about itself and nothing stronger. It has no subjects, materials, products, backrefs or exports, because any of them would let an agent-chosen string shape what a policy resolves. It refuses malformed input instead of recording it: a wrong checkpoint is better unsigned than signed.

Validate it locally

Run the invocation above with any valid UUID. Each of these is refused: an unknown checkpoint, an uppercase or path-shaped session id, a ticket written as a URL or prose, prompt text where a digest belongs, --waiting-on on anything but waiting, and --job on anything but dispatch or joined.

How a verifier consumes this

It satisfies no policy requirement by itself. The platform's work-trace verdict may read one fact from it, whether a captured prompt named the ticket, and carries that in its own signed verdict labelled Observed (harness). A repo that must hold against a lying agent requires the assignment basis, which this record cannot supply.

Notes

  • The session id joins this record to alps-evidence on the push.
  • A dispatch and a node's launch receipt naming the same job make a two-sided record of work that moved to another machine.

Gotchas

  • The checkpoint set is closed. An adapter maps vendor events onto it and drops an event with no mapping, rather than inventing a kind.
  • Prompt digests must be salted per session by the caller. A plain hash of a short prompt can be guessed.

FAQ

Does this prove the agent worked on the ticket? No. It proves the session said so, signed by the agent's principal. Proof that a person authorized the work comes from the ticket system (an assignment) or the AAL2 ceremony.

See also

  • alps-evidence: which coding agent invoked cilock.
  • code-review, change-approval: review and approval records.

This page is generated from the CI/lock tool catalog. Don't edit it here — the source is attestation/detection/docs/agent-session.doc.md in aflock-ai/rookery. The same catalog powers cilock tools show agent-session in the CLI, so a single edit keeps the terminal and the website in sync.

Edit this page →  ·  Add a new tool →

When you open the pull request: if you are an AI agent, add the ai-agent label. If you are a human, add the human label.

Reference generated from the product documentation. Match commands and support details to your installed release.