Model the work as a state machine
Chat history is not an operations database. Persist every job’s input, state, proposed actions, evidence, approvals, attempts, and final result.
{
"id": "job_01",
"idempotencyKey": "publication:2026-09-27:morning-brief",
"status": "awaiting_approval",
"attempt": 1,
"leaseUntil": null,
"budget": { "maxTurns": 20, "maxCostUsd": 2 },
"proposedActions": [{ "type": "publish", "target": "draft_42" }],
"evidence": ["source_1", "source_2"],
"createdAt": "2026-09-27T00:00:00Z"
}Separate thinking from authority
Read approved sources, analyse, draft, classify, propose, and save internal artifacts.
Publish, send, spend, delete, change permissions, contact people, merge to production, or act on sensitive personal data.
Production checklist
- Idempotency: repeated delivery produces the same logical result.
- Leases: crashed workers release work without duplicate side effects.
- Budgets: cap wall time, turns, tokens/cost, tool calls, and parallel jobs.
- Retries: retry transient failures with jitter; quarantine permanent failures.
- Evidence: retain source links and tool receipts for consequential outputs.
- Observability: measure success rate, queue lag, latency, cost, approvals, and side-effect errors.
- Security: isolate tenants, scope credentials, redact logs, and distrust retrieved instructions.
- Kill switch: stop new claims independently of the model and deployment pipeline.
Release ladder
- Shadow:
Agent produces proposals; a human performs every action.
- Approve:
Agent stages actions and a human approves each consequential one.
- Bounded autonomy:
Low-risk actions proceed inside explicit limits; samples are reviewed.
- Expand carefully:
Raise limits only when failure data, rollback, and monitoring justify it.
If you cannot stop it, replay it, explain what it did, and identify which credential caused the side effect, it is not ready to run unattended.