Skip to main content
Version: MVP

ADR 0003 · Secret handling

2 min readAcceptedRecorded 2026-05-01

What this ADR decides

That Craik stores and displays secret references, not secret values. Secrets are resolved at request time and injected into transport headers by a per-request header factory. Local persistence rejects unredacted secret-looking payloads.

Status: Accepted.

The product premise is durable, auditable agent work. That value breaks immediately if receipts, handoffs, or fixtures leak credentials.

Context

Craik writes receipts, handoffs, case files, provider configs, and local store records. Those artifacts must be useful for audit and replay without leaking API keys, tokens, local credentials, or copied secrets from adjacent tools.

Decision

References, not values

Runtime configs use env-var names or other non-secret references.

Request-time resolution

A resolver injects secrets into transport headers via a per-request header factory.

Persistence rejection

Local persistence rejects unredacted secret-looking payloads.

Receipt redaction

Receipts redact request metadata before storage.

Public surfaces

Errors and public docs must not include raw secret values. Missing-secret errors avoid disclosing unnecessary intent.

Debug logging

May name references only when explicitly scoped for local diagnosis.

Consequences

Operators can audit which credential reference was used without exposing the credential. Provider transports and migration tools need explicit tests to prove that authorization headers and copied secret values are not stored in exceptions, receipts, docs, or fixtures.

Alternatives considered

Alternative
Disposition
Why rejected
Persist encrypted secrets in local state
rejected for MVP
Would turn Craik into a secret manager — out of scope for the runtime.
Static headers into transports
rejected
Would retain credentials on long-lived runtime objects.

Retraction: none active.

Retract this ADR only if Craik formally adopts a secret-storage subsystem with rotation, encryption, access control, and audit semantics.

What's next