Agency & Decisions

Approval

Solves: deciding, with enough in view, before an agent does a thing that is hard to undo.

Established — a stable convention across independent vendors.

pattern: established code: beta <ApprovalGate>: Beta: the code works and has tests, and its API can still change.

watching →emerging →established →contested →fading 151 sightings since Jun 2026 seen in 2 different contexts
Ask an assistant about this pattern Ask ChatGPT ↗Ask Claude ↗

Approval creates a deliberate decision moment before an agent takes an action that matters. The person sees what is about to happen, understands its consequence and scope, and can approve, change, or stop it. The decision is recorded so it can be revisited or withdrawn.

When to Use It

  • An agent action is consequential and hard to reverse
  • You need consent scoped explicitly — once, per session, or standing
  • An audit trail of who authorized what matters

When Not To

  • The action is cheap to undo; use recovery instead of asking
  • You would be asking about everything, and constant prompts train reflexive approval
  • The real question is the shape of the work; decide on the plan, not each action

Three views

The exchange between the human, the agent and the system the agent acts on; who holds each part of it; and the component that implements it.

01 · the interaction
human agent system files · rows · accounts reads the target file, row or account proposes the action, with a preview sets the scope: this file, this run, this session approves or rejects writes the change (nothing, on reject) returns the result and a receipt shows the receipt
02 · who holds what
human interface agent Preview: The AI shows you the exact change before it makes it, line by line where it can 01 Preview Scope: You choose how far a yes reaches: this once, this session, or from now on 02 Scope Approve: You say yes and the AI goes ahead 03 Approve Reject: You say no and nothing happens 04 Reject Edit: You change the proposal instead of taking or leaving it 05 Edit Expiry: The request times out on its own if you walk away 06 Expiry Receipt: A record of what you decided and what the AI did 07 Receipt
human interface agent Preview: The AI shows you the exact change before it makes it, line by line where it can 01 Preview Scope: You choose how far a yes reaches: this once, this session, or from now on 02 Scope Approve: You say yes and the AI goes ahead 03 Approve Reject: You say no and nothing happens 04 Reject Edit: You change the proposal instead of taking or leaving it 05 Edit Expiry: The request times out on its own if you walk away 06 Expiry Receipt: A record of what you decided and what the AI did 07 Receipt
  1. 01 Preview The AI shows you the exact change before it makes it, line by line where it can
  2. 02 Scope You choose how far a yes reaches: this once, this session, or from now on
  3. 03 Approve You say yes and the AI goes ahead
  4. 04 Reject You say no and nothing happens
  5. 05 Edit You change the proposal instead of taking or leaving it
  6. 06 Expiry The request times out on its own if you walk away
  7. 07 Receipt A record of what you decided and what the AI did
03 · the component · code: beta

vendor presets are recreations, not vendor assets

THE LIVE PLAYGROUND NEEDS A WIDER SCREEN — IT'S WAITING ON DESKTOP. THE ANATOMY ABOVE AND THE CODE BELOW ARE THE SAME COMPONENT.

Do / Don't

Do

State the exact action and its scope directly above the decision buttons.

Don't

Bundle unrelated actions under one approve.

Consent to a vague or composite proposal is not consent — the preview is the contract.

Do

Offer once / session / always so trust can be widened deliberately and revoked visibly.

Don't

Default to always-allow to make the prompts go away.

Always-allow trades every future review for present speed — make that trade explicit, inspectable, and reversible.

Do

Ask only before actions that matter and are hard to reverse.

Don't

Put an approval prompt in front of everything the agent does.

Too many asks train reflexive approval, which is worse than never asking at all.

Do

Replace the ask with undo where actions are cheap to reverse.

Don't

Ask permission for sandboxed or checkpointed work.

Reversibility spends no human attention until something goes wrong; asking spends it every time. Reserve the decision for the irreversible.

Every pair cites a documented tension or principle boundary — no free-floating taste.

Get the Code

Namespaced install (add the registry to components.json once):

{
  "registries": {
    "@agentsandhumans": "https://agentsandhumans.ai/api/registry/{name}.json"
  }
}
npx shadcn@latest add @agentsandhumans/approval-gate

Or install directly from the endpoint:

npx shadcn@latest add https://agentsandhumans.ai/api/registry/approval-gate.json

Dependencies: react · Files: patterns/approval-gate/approval-gate-core.tsx · patterns/approval-gate/approval-gate.tsx · patterns/tokens.css

patterns/approval-gate/approval-gate-core.tsx
/**
 * ApprovalGate — headless core.
 * Pattern: letting a human authorize an agent action before it executes.
 * Anatomy: Preview · Details · Scope · Approve · Reject · Edit · Editor · Expiry · Receipt · Revoke · Changed
 *
 * The state machine IS the pattern definition. Anatomy parts that a vendor
 * does not implement are switched off via ApprovalGateConfig (see presets in
 * @agentsandhumans/patterns-ui) — which is how the playground can render
 * "ApprovalGate as Claude Code does it" against "as Codex does it".
 *
 * Lifecycle (spec 2026-10-04 §2):
 *   pending → editing → pending   (saving an edit makes a new request version)
 *   pending → granted | denied | expired
 *   granted → revoked
 * APPROVE, REJECT, EDIT and EXPIRE act only while pending. A decision is for one
 * request version, never "the latest": when the host sends a new version after a
 * decision, that decision no longer applies and the gate asks again.
 */
import * as React from 'react';
import {
  createEvent,
  type ActionRequest,
  type ApprovalDecision,
  type ApprovalOutcome,
  type ApprovalRequestedPayload,
  type ApprovalRevocation,
  type ApprovalScope,
  type EventDraft,
  type InteractionEventHandler,
} from '@/lib/interaction-contract';

// The shared records live in the contract; re-exported so existing imports keep working.
export type { ActionRequest, ApprovalDecision, ApprovalOutcome, ApprovalRevocation, ApprovalScope } from '@/lib/interaction-contract';

export type ApprovalState = 'pending' | 'editing' | 'granted' | 'denied' | 'expired' | 'revoked';

export interface ApprovalGateConfig {
  /** Which scope options this implementation offers. Empty = no Scope part. */
  scopes: ApprovalScope[];
  defaultScope: ApprovalScope;
  /** Auto-timeout in ms per request version; null = the Expiry part is absent. */
  expiresInMs: number | null;
  /** Whether the human can edit the proposal instead of accept/reject. */
  allowEdit: boolean;
}

export const defaultConfig: ApprovalGateConfig = {
  scopes: ['once', 'session', 'standing'],
  defaultScope: 'once',
  expiresInMs: null,
  allowEdit: true,
};

/** Words a person reads for each scope. */
export const scopeLabel: Record<ApprovalScope, string> = {
  once: 'once',
  session: 'this session',
  standing: 'always',
};

export type Event =
  | { type: 'APPROVE'; at?: string }
  | { type: 'REJECT'; at?: string }
  | { type: 'EXPIRE'; at?: string }
  | { type: 'EDIT' }
  | { type: 'SET_DRAFT'; args: unknown; valid?: boolean }
  | { type: 'SAVE_EDIT' }
  | { type: 'CANCEL_EDIT' }
  | { type: 'SET_SCOPE'; scope: ApprovalScope }
  | { type: 'REVOKE'; at?: string }
  /** The host sent a request: a new id, or a version above the last one it sent. */
  | { type: 'REQUEST_CHANGED'; request: ActionRequest }
  /** The host verified and stored the current decision. */
  | { type: 'RECEIPT'; serverReceiptId: string };

export interface MachineState {
  state: ApprovalState;
  scope: ApprovalScope;
  /** The version on screen: the host's, or the one an edit made. */
  request: ActionRequest;
  /** The last version the host sent; host updates are compared with this. */
  hostVersion: number;
  /** Set when the version on screen came from the person's edit. */
  editedArgs?: unknown;
  /** The args being edited, while editing. */
  draft: unknown;
  draftValid: boolean;
  decision: ApprovalDecision | null;
  revocation: ApprovalRevocation | null;
  /** The decision a later request version replaced. It no longer applies. */
  superseded: ApprovalDecision | null;
}

export function initialState(request: ActionRequest, scope: ApprovalScope = defaultConfig.defaultScope): MachineState {
  return {
    state: 'pending',
    scope,
    request,
    hostVersion: request.version,
    draft: request.args,
    draftValid: true,
    decision: null,
    revocation: null,
    superseded: null,
  };
}

function decide(s: MachineState, outcome: ApprovalOutcome, at?: string): MachineState {
  const decision: ApprovalDecision = {
    requestId: s.request.id,
    requestVersion: s.request.version,
    outcome,
    scope: s.scope,
    decidedAt: at ?? new Date().toISOString(),
  };
  if (s.editedArgs !== undefined) decision.editedArgs = s.editedArgs;
  return { ...s, state: outcome, decision };
}

export function reducer(s: MachineState, e: Event): MachineState {
  switch (e.type) {
    case 'APPROVE':
      return s.state === 'pending' ? decide(s, 'granted', e.at) : s;
    case 'REJECT':
      return s.state === 'pending' ? decide(s, 'denied', e.at) : s;
    case 'EXPIRE':
      return s.state === 'pending' ? decide(s, 'expired', e.at) : s;
    case 'EDIT':
      return s.state === 'pending' ? { ...s, state: 'editing', draft: s.request.args, draftValid: true } : s;
    case 'SET_DRAFT':
      return s.state === 'editing' ? { ...s, draft: e.args, draftValid: e.valid ?? true } : s;
    case 'SAVE_EDIT':
      if (s.state !== 'editing' || !s.draftValid) return s;
      return {
        ...s,
        state: 'pending',
        request: { ...s.request, version: s.request.version + 1, args: s.draft },
        editedArgs: s.draft,
      };
    case 'CANCEL_EDIT':
      return s.state === 'editing' ? { ...s, state: 'pending', draft: s.request.args, draftValid: true } : s;
    case 'SET_SCOPE':
      return s.state === 'pending' || s.state === 'editing' ? { ...s, scope: e.scope } : s;
    case 'REVOKE':
      if (s.state !== 'granted' || !s.decision) return s;
      return {
        ...s,
        state: 'revoked',
        revocation: {
          requestId: s.decision.requestId,
          requestVersion: s.decision.requestVersion,
          revokedAt: e.at ?? new Date().toISOString(),
        },
      };
    case 'REQUEST_CHANGED': {
      const r = e.request;
      const sameRequest = r.id === s.request.id;
      // A duplicate or an older version changes nothing.
      if (sameRequest && r.version <= s.hostVersion) return s;
      return {
        ...initialState(r, s.scope),
        // A new version of the same request carries the earlier decision as a record only.
        superseded: sameRequest ? s.decision ?? s.superseded : null,
      };
    }
    case 'RECEIPT':
      if (!s.decision || s.decision.serverReceiptId === e.serverReceiptId) return s;
      return { ...s, decision: { ...s.decision, serverReceiptId: e.serverReceiptId } };
  }
}

const decisionKey = (d: ApprovalDecision) => `${d.requestId}@${d.requestVersion}:${d.outcome}:${d.decidedAt}`;

/**
 * The contract events one transition produces (spec 2026-10-04 §1). `prev` is
 * null on mount. `correlationId` defaults to the request id; pass the plan id
 * to tie the approval to the plan it runs.
 */
export function approvalEvents(prev: MachineState | null, next: MachineState, correlationId?: string): EventDraft[] {
  const corr = correlationId ?? next.request.id;
  const out: EventDraft[] = [];
  const newVersion =
    prev === null || prev.request.id !== next.request.id || prev.request.version !== next.request.version;
  if (newVersion && !isSettled(next.state)) {
    const edited = prev !== null && prev.request.id === next.request.id && next.editedArgs !== undefined;
    const payload: ApprovalRequestedPayload = { request: next.request, edited };
    out.push({ type: 'approval.requested', actor: edited ? 'human' : 'agent', correlationId: corr, payload });
  }
  const d = next.decision;
  if (d && (!prev?.decision || decisionKey(prev.decision) !== decisionKey(d))) {
    out.push({ type: `approval.${d.outcome}`, actor: d.outcome === 'expired' ? 'system' : 'human', correlationId: corr, payload: d });
  }
  if (next.revocation && next.revocation !== prev?.revocation) {
    out.push({ type: 'approval.revoked', actor: 'human', correlationId: corr, payload: next.revocation });
  }
  return out;
}

export const isSettled = (state: ApprovalState) => state !== 'pending' && state !== 'editing';

interface ApprovalGateContext extends MachineState {
  config: ApprovalGateConfig;
  /** When the current version expires (epoch ms); null when expiry is off. */
  deadline: number | null;
  send: (e: Event) => void;
}

const Ctx = React.createContext<ApprovalGateContext | null>(null);

export function useApprovalGate(): ApprovalGateContext {
  const ctx = React.useContext(Ctx);
  if (!ctx) throw new Error('ApprovalGate parts must be used inside <ApprovalGate.Root>');
  return ctx;
}

export interface RootProps {
  /** The action the agent asks to take. Send a new version whenever it changes. */
  request: ActionRequest;
  config?: Partial<ApprovalGateConfig>;
  /** Called once per decision. Verify it server-side, then pass back serverReceiptId. */
  onDecision?: (d: ApprovalDecision) => void;
  onRevoke?: (r: ApprovalRevocation) => void;
  /** The id your server returned after storing the current decision. Until then the receipt is local. */
  serverReceiptId?: string;
  /** One agent run; stamped on every contract event. Defaults to a generated id. */
  runId?: string;
  /** Carried on every approval.* event. Pass the plan id so the approval points at the plan; defaults to the request id. */
  correlationId?: string;
  /** Contract events: approval.requested, approval.granted | denied | expired, approval.revoked. */
  onEvent?: InteractionEventHandler;
  children: React.ReactNode;
}

function Root({
  request,
  config: partial,
  onDecision,
  onRevoke,
  serverReceiptId,
  runId,
  correlationId,
  onEvent,
  children,
}: RootProps) {
  const config = React.useMemo(() => ({ ...defaultConfig, ...partial }), [partial]);
  const [machine, send] = React.useReducer(reducer, request, (r) => initialState(r, config.defaultScope));

  // Host updates: a new id, or a higher version, replaces what is on screen.
  React.useEffect(() => {
    send({ type: 'REQUEST_CHANGED', request });
    // The id and version identify a request; other fields change only with the version.
  }, [request.id, request.version]);

  // The receipt id applies to the decision on screen when the host sends it.
  React.useEffect(() => {
    if (serverReceiptId) send({ type: 'RECEIPT', serverReceiptId });
  }, [serverReceiptId]);

  // One expiry window per request version. Editing pauses the gate but not the clock.
  const versionKey = `${machine.request.id}@${machine.request.version}`;
  const [opened, setOpened] = React.useState({ key: versionKey, at: Date.now() });
  if (opened.key !== versionKey) setOpened({ key: versionKey, at: Date.now() });
  const deadline = config.expiresInMs == null ? null : opened.at + config.expiresInMs;

  React.useEffect(() => {
    if (deadline == null || machine.state !== 'pending') return;
    const t = setTimeout(() => send({ type: 'EXPIRE' }), Math.max(0, deadline - Date.now()));
    return () => clearTimeout(t);
  }, [deadline, machine.state]);

  const emitted = React.useRef<string | null>(null);
  React.useEffect(() => {
    if (!machine.decision) return;
    const key = decisionKey(machine.decision);
    if (key === emitted.current) return;
    emitted.current = key;
    onDecision?.(machine.decision);
  }, [machine.decision, onDecision]);

  const revoked = React.useRef<ApprovalRevocation | null>(null);
  React.useEffect(() => {
    if (machine.revocation && machine.revocation !== revoked.current) {
      revoked.current = machine.revocation;
      onRevoke?.(machine.revocation);
    }
  }, [machine.revocation, onRevoke]);

  const fallbackRun = React.useId();
  const run = runId ?? fallbackRun;
  const emit = React.useRef(onEvent);
  emit.current = onEvent;
  const prevMachine = React.useRef<MachineState | null>(null);
  React.useEffect(() => {
    const drafts = approvalEvents(prevMachine.current, machine, correlationId);
    prevMachine.current = machine;
    for (const d of drafts) emit.current?.(createEvent(run, d));
  }, [machine, correlationId, run]);

  const value = React.useMemo(() => ({ ...machine, config, deadline, send }), [machine, config, deadline]);

  return (
    <Ctx.Provider value={value}>
      <div
        role="group"
        aria-label="Approval required"
        data-pattern="approval-gate"
        data-part="root"
        data-state={machine.state}
        data-request-id={machine.request.id}
        data-request-version={machine.request.version}
      >
        {children}
      </div>
    </Ctx.Provider>
  );
}

export function formatArgs(args: unknown): string {
  if (typeof args === 'string') return args;
  if (args === undefined) return '';
  return JSON.stringify(args, null, 2);
}

/** The proposed action. Renders the action and its args unless children replace them. */
function Preview({ children }: { children?: React.ReactNode | ((r: ActionRequest) => React.ReactNode) }) {
  const { state, request } = useApprovalGate();
  const body =
    typeof children === 'function' ? (
      children(request)
    ) : children !== undefined ? (
      children
    ) : (
      <>
        <strong data-part="action">{request.action}</strong>
        {request.args !== undefined && <div data-part="args">{formatArgs(request.args)}</div>}
      </>
    );
  return (
    <div data-part="preview" data-state={state}>
      {body}
    </div>
  );
}

/** Version, what it touches, what follows, whether it can be undone. */
function Details() {
  const { request, editedArgs } = useApprovalGate();
  return (
    <dl data-part="details">
      <dt>Version</dt>
      <dd>
        {request.version}
        {editedArgs !== undefined ? ' (your edit)' : ''}
      </dd>
      {request.resources.length > 0 && (
        <>
          <dt>Touches</dt>
          <dd>{request.resources.join(', ')}</dd>
        </>
      )}
      {request.consequences && (
        <>
          <dt>What happens</dt>
          <dd>{request.consequences}</dd>
        </>
      )}
      <dt>Undo</dt>
      <dd data-reversible={request.reversible}>{request.reversible ? 'Can be undone' : 'Cannot be undone'}</dd>
    </dl>
  );
}

/** What is authorized: once | session | standing. Renders nothing when the implementation has no scopes. */
function Scope() {
  const { config, scope, state, send } = useApprovalGate();
  const name = React.useId();
  if (config.scopes.length === 0) return null;
  return (
    <fieldset data-part="scope" data-state={state} disabled={isSettled(state)}>
      <legend>Allow</legend>
      {config.scopes.map((s) => (
        <label key={s}>
          <input
            type="radio"
            name={name}
            value={s}
            checked={scope === s}
            onChange={() => send({ type: 'SET_SCOPE', scope: s })}
          />
          {scopeLabel[s]}
        </label>
      ))}
    </fieldset>
  );
}

type TriggerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>;

function Approve(props: TriggerProps) {
  const { state, send } = useApprovalGate();
  return (
    <button type="button" data-part="approve" disabled={state !== 'pending'} onClick={() => send({ type: 'APPROVE' })} {...props} />
  );
}

function Reject(props: TriggerProps) {
  const { state, send } = useApprovalGate();
  return (
    <button type="button" data-part="reject" disabled={state !== 'pending'} onClick={() => send({ type: 'REJECT' })} {...props} />
  );
}

/** Opens the Editor. Only from pending; renders nothing when the implementation has no edit. */
function Edit(props: TriggerProps) {
  const { state, config, send } = useApprovalGate();
  if (!config.allowEdit) return null;
  return (
    <button
      type="button"
      data-part="edit"
      aria-expanded={state === 'editing'}
      disabled={state !== 'pending'}
      onClick={() => send({ type: 'EDIT' })}
      {...props}
    />
  );
}

/**
 * The args as text while editing. String args edit as they are; anything else edits as JSON,
 * and Save stays off until the JSON parses. Saving makes the next request version.
 */
function Editor({ label = 'Edit the request', save = 'Save edit', cancel = 'Cancel' }: { label?: string; save?: string; cancel?: string }) {
  const { state, request, draft, draftValid, send } = useApprovalGate();
  const [text, setText] = React.useState(() => formatArgs(draft));
  const id = React.useId();
  React.useEffect(() => {
    if (state === 'editing') setText(formatArgs(request.args));
  }, [state, request.args]);
  if (state !== 'editing') return null;
  const asString = typeof request.args === 'string';
  const onChange = (value: string) => {
    setText(value);
    if (asString) return send({ type: 'SET_DRAFT', args: value });
    try {
      send({ type: 'SET_DRAFT', args: JSON.parse(value) });
    } catch {
      send({ type: 'SET_DRAFT', args: draft, valid: false });
    }
  };
  return (
    <div data-part="editor">
      <label htmlFor={id}>{label}</label>
      <textarea id={id} value={text} aria-invalid={!draftValid} onChange={(ev) => onChange(ev.target.value)} />
      {!draftValid && <p data-part="editor-error">This is not valid JSON yet.</p>}
      <div data-part="editor-actions">
        <button type="button" data-part="save-edit" disabled={!draftValid} onClick={() => send({ type: 'SAVE_EDIT' })}>
          {save}
        </button>
        <button type="button" data-part="cancel-edit" onClick={() => send({ type: 'CANCEL_EDIT' })}>
          {cancel}
        </button>
      </div>
    </div>
  );
}

/** Countdown surface for the auto-timeout. Renders nothing when expiry is absent. */
function Expiry({ children }: { children?: (msLeft: number) => React.ReactNode }) {
  const { deadline, state } = useApprovalGate();
  const [now, setNow] = React.useState(() => Date.now());
  React.useEffect(() => {
    if (deadline == null || state !== 'pending') return;
    setNow(Date.now());
    const i = setInterval(() => setNow(Date.now()), 1000);
    return () => clearInterval(i);
  }, [deadline, state]);
  if (deadline == null) return null;
  const msLeft = Math.max(0, deadline - now);
  return (
    <div data-part="expiry" data-state={state} aria-live="polite">
      {children ? children(msLeft) : `${Math.ceil(msLeft / 1000)}s`}
    </div>
  );
}

const outcomeLabel: Record<ApprovalOutcome, string> = { granted: 'Granted', denied: 'Denied', expired: 'Expired' };

/** "Verified" only once the host passes serverReceiptId; before that the record is local. */
export function receiptStatus(d: ApprovalDecision): 'Verified' | 'Recorded on this device' {
  return d.serverReceiptId ? 'Verified' : 'Recorded on this device';
}

export function receiptText(d: ApprovalDecision, revocation: ApprovalRevocation | null = null): string {
  if (revocation) return `Revoked. The grant for version ${d.requestVersion} no longer applies.`;
  const scope = d.outcome === 'granted' ? `, ${scopeLabel[d.scope]}` : '';
  const edited = d.editedArgs !== undefined ? ' with your edit' : '';
  return `${outcomeLabel[d.outcome]}${scope}, for version ${d.requestVersion}${edited}. ${receiptStatus(d)}.`;
}

/** Post-decision record. Renders only after the gate settles. */
function Receipt({ children }: { children?: (d: ApprovalDecision, revocation: ApprovalRevocation | null) => React.ReactNode }) {
  const { decision, revocation, state } = useApprovalGate();
  if (!decision || !isSettled(state)) return null;
  return (
    <div
      data-part="receipt"
      data-state={state}
      data-verified={decision.serverReceiptId ? 'true' : 'false'}
      aria-live="polite"
    >
      {children ? (
        children(decision, revocation)
      ) : (
        <>
          {receiptText(decision, revocation)} <time dateTime={decision.decidedAt}>{decision.decidedAt}</time>
        </>
      )}
    </div>
  );
}

/** Withdraws a grant. Renders only while granted. */
function Revoke(props: TriggerProps) {
  const { state, send } = useApprovalGate();
  if (state !== 'granted') return null;
  return <button type="button" data-part="revoke" onClick={() => send({ type: 'REVOKE' })} {...props} />;
}

export function changedText(old: ApprovalDecision, current: ActionRequest): string {
  return `The agent changed the request after your decision. That decision covered version ${old.requestVersion} and does not apply to version ${current.version}.`;
}

/** Shown when a new request version replaced an earlier decision. */
function Changed({ children }: { children?: (old: ApprovalDecision, current: ActionRequest) => React.ReactNode }) {
  const { superseded, request, state } = useApprovalGate();
  if (!superseded || isSettled(state)) return null;
  return (
    <div data-part="changed" role="status">
      {children ? children(superseded, request) : changedText(superseded, request)}
    </div>
  );
}

export const ApprovalGate = Object.assign(Root, {
  Preview,
  Details,
  Scope,
  Approve,
  Reject,
  Edit,
  Editor,
  Expiry,
  Receipt,
  Revoke,
  Changed,
});
patterns/approval-gate/approval-gate.tsx
/**
 * ApprovalGate — styled reference implementation with vendor presets.
 * Presets are descriptive recreations mined from official docs for comparison —
 * never vendor assets or copied proprietary styling. Label them "recreation".
 */
import * as React from 'react';
import {
  ApprovalGate as Core,
  type ActionRequest,
  type ApprovalDecision,
  type ApprovalGateConfig,
  type ApprovalRevocation,
} from './approval-gate-core';
import type { InteractionEventHandler } from '@/lib/interaction-contract';

export interface ApprovalGatePreset {
  id: string;
  label: string;
  copy: {
    title: string;
    approve: string;
    reject: string;
    edit?: string;
    revoke?: string;
  };
  machineConfig: Partial<ApprovalGateConfig>;
}

export const presets: Record<'neutral' | 'anthropic' | 'openai', ApprovalGatePreset> = {
  neutral: {
    id: 'neutral',
    label: 'Neutral',
    copy: { title: 'Approval required', approve: 'Approve', reject: 'Reject', edit: 'Edit', revoke: 'Revoke' },
    machineConfig: { scopes: ['once', 'session', 'standing'], defaultScope: 'once', expiresInMs: null, allowEdit: true },
  },
  anthropic: {
    id: 'anthropic',
    label: 'Claude Code (recreation)',
    copy: {
      title: 'Claude wants to run',
      approve: 'Yes',
      reject: "No, tell Claude what to do differently",
      edit: undefined, // redirect via reply, not in-place edit
      revoke: 'Remove rule',
    },
    // Scope is a first-class editable object: once / session / always rules
    machineConfig: { scopes: ['once', 'session', 'standing'], defaultScope: 'once', expiresInMs: null, allowEdit: false },
  },
  openai: {
    id: 'openai',
    label: 'Codex (recreation)',
    copy: { title: 'Codex requests approval', approve: 'Approve', reject: 'Deny' },
    // Mode-based: per-command approval, no persistent rule editing, no revoke
    machineConfig: { scopes: ['once', 'session'], defaultScope: 'once', expiresInMs: null, allowEdit: false },
  },
};

export interface ApprovalGateProps {
  preset?: keyof typeof presets;
  /** The action the agent asks to take. Send a new version whenever it changes. */
  request: ActionRequest;
  /** Overrides the preset's machine config, e.g. a shorter expiry. */
  config?: Partial<ApprovalGateConfig>;
  /** Called once per decision. Verify it server-side, then pass back serverReceiptId. */
  onDecision?: (d: ApprovalDecision) => void;
  onRevoke?: (r: ApprovalRevocation) => void;
  /** The id your server returned after storing the decision. The receipt reads "Verified" once set. */
  serverReceiptId?: string;
  /** One agent run; stamped on every contract event. */
  runId?: string;
  /** Interaction Contract events (see the Interaction Contract docs page). */
  onEvent?: InteractionEventHandler;
  /** Carried on every approval.* event. Pass the plan id so the approval points at the plan. */
  correlationId?: string;
}

export function ApprovalGate({
  preset = 'neutral',
  request,
  config,
  onDecision,
  onRevoke,
  serverReceiptId,
  runId,
  onEvent,
  correlationId,
}: ApprovalGateProps) {
  const p = presets[preset];
  const machineConfig = React.useMemo(() => ({ ...p.machineConfig, ...config }), [p, config]);
  return (
    <Core
      request={request}
      config={machineConfig}
      onDecision={onDecision}
      onRevoke={onRevoke}
      serverReceiptId={serverReceiptId}
      runId={runId}
      onEvent={onEvent}
      correlationId={correlationId}
    >
      <div className="ah-approval" data-preset={p.id}>
        <p style={{ margin: '0 0 .5rem', fontSize: '.75rem', textTransform: 'uppercase', letterSpacing: '.08em', opacity: 0.6 }}>
          {p.copy.title}
        </p>
        <Core.Changed />
        <Core.Preview />
        <Core.Details />
        <Core.Editor />
        <Core.Scope />
        <div className="ah-actions">
          <Core.Approve>{p.copy.approve}</Core.Approve>
          <Core.Reject>{p.copy.reject}</Core.Reject>
          {p.copy.edit && <Core.Edit>{p.copy.edit}</Core.Edit>}
          {p.copy.revoke && <Core.Revoke>{p.copy.revoke}</Core.Revoke>}
          <Core.Expiry />
        </div>
        <Core.Receipt />
      </div>
    </Core>
  );
}

Give this to your coding agent (shadcn MCP: npx shadcn@latest mcp init --client claude):

Add the @agentsandhumans registry to components.json:
{
  "registries": {
    "@agentsandhumans": "https://agentsandhumans.ai/api/registry/{name}.json"
  }
}
Then install approval-gate (npx shadcn@latest add @agentsandhumans/approval-gate) and wire it into the flow where your agent deciding, with enough in view, before an agent does a thing that is hard to undo.

Field Notes

FIG. 1 · Approval on the record
    20 NOTES ON APPROVAL IN 26 WEEKS · SCRUB THE WEEKS, CLICK ONE TO PIN IT
    Published, annotated field notes attached to Approval, by week observed · last 26 weeks · n = 20. Rail markers are lifecycle events from the pattern changelog.
    Data table
    Week ofNotes
    OCT 263,000 turns show coding agents rewrite far more than you asked · FlashScript turns repeated agent runs into fixed, reusable programs
    NOV 2Apiiro found 1,122 GitHub files holding passwords after one approval · Researchers argue shared agent parts make each step easier to review · OpenAI patched a thousand Linux vulnerabilities without human sign-off · One AI helper can deceive another before you see the result · PrivacyFlow maps where agents leak personal data before damage is done · Interface Quilt adds buttons to live apps without touching their code
    NOV 9Adversaries learned to weaponize an agent's refusal to act · ShadowBench finds agents calling services operators did not approve · Stanford tests find AI agents duped by realistic scam instructions · Simon Willison had Claude write code to find a mystery beep · 289 workers sorted tasks they would delegate from tasks they kept
    NOV 16Study finds reviewer expertise matters more than reviewer presence · Shopping agents sound more certain but pick no better products · Researchers find AI agents can be redirected to a fake tool by name · 108 crisis counselors showed where AI drafts help and where they hurt
    NOV 23Anthropic puts Claude Code at 80 to 90 percent of a spy campaign · AgentBouncer watches each system call a coding agent makes · Fault-injection study finds AI judges miss unsafe clinical calls
    NOV 28 · Firsthand · via Anthropic Agent IdentityApprovalOff-Brief AlertPermissionsReach Preview

    Anthropic puts Claude Code at 80 to 90 percent of a spy campaign

    The clip calling this breaking on November 28, 2026 is 380 days late. The part worth keeping is the operator's own review loop: four to six stops where a person checked the agent's findings before acting. The targets had no such stop. Give that loop to the people the agent works for.

    NOV 26 · Paper · via arXiv ApprovalBudget ScopingPermissions

    AgentBouncer watches each system call a coding agent makes

    The brief the human wrote at the start becomes the measure each action is checked against. That turns a one-time instruction into a standing contract the agent is held to throughout the run.

    NOV 26 · Paper · via arXiv ApprovalObservabilityReview

    Fault-injection study finds AI judges miss unsafe clinical calls

    The reviewer, AI or human, fails when it sees only the last action. This is the strongest evidence I've seen that context depth in review is a requirement, and that rules plus AI judgment beat either alone.

    NOV 20 · Paper · via arXiv ApprovalHuman HandoffReview

    Study finds reviewer expertise matters more than reviewer presence

    The approval view should show the reviewer what the AI did and why. A reviewer who cannot judge the domain will agree with the AI whether right or wrong, and that agreement costs more than it saves.

    NOV 18 · Paper · via arXiv ApprovalConfidence SignalingHuman Handoff

    Shopping agents sound more certain but pick no better products

    The agent gets louder as it gets more wrong. Confidence display becomes a liability when it tracks effort, not accuracy. Approval needs the agent's reasoning in view, not its certainty score.

    NOV 17 · Paper · via arXiv ApprovalObservabilityPermissions

    Researchers find AI agents can be redirected to a fake tool by name

    The human approved a name, not a server. Any approval screen that hides the server origin lets the human confirm the wrong thing. This finding is the clearest evidence yet that approval screens need a verified-provider layer.

    NOV 17 · Paper · via arXiv ApprovalHuman HandoffReview

    108 crisis counselors showed where AI drafts help and where they hurt

    The counselor approves a full draft and the reflection step disappears. That is the clearest field sighting I have seen of approval compressing a human role rather than supporting it.

    NOV 14 · Paper · via arXiv ApprovalObservabilityOff-Brief Alert

    Adversaries learned to weaponize an agent's refusal to act

    Refusal read as the safe outcome. This paper shows an attacker can flip that. I need to design what the human sees when the agent stops, not only when it acts.

    NOV 10 · Paper · via arXiv ApprovalPermissionsReach Preview

    ShadowBench finds agents calling services operators did not approve

    The human approved a set of services, then the agent called a different one. That gap, invisible without a test to find it, is what approval-scope and reach-preview patterns are meant to close.

    NOV 10 · Paper · via arXiv ApprovalEmergency StopPermissions

    Stanford tests find AI agents duped by realistic scam instructions

    The agent read the environment and acted. No one asked the operator first. That gap between 'agent reads something' and 'agent does something irreversible' is where Approval and emergency-stop both live.

    NOV 10 · Firsthand · via Simon Willison ApprovalBackground ExecutionObservability

    Simon Willison had Claude write code to find a mystery beep

    The agent built its own sensing tool and ran it without Willison seeing the approach first. That gap between 'describe the problem' and 'here are results' is where approval decisions belong in a product design.

    NOV 9 · Paper · via arXiv ApprovalBackground ExecutionDelegation

    289 workers sorted tasks they would delegate from tasks they kept

    The study shows the human's hand stays on tasks where accountability lands on them. Design for that: an agent that cannot read the stakes of a task will take over work the human needed to own.

    NOV 7 · Clipped · via Hacker News ApprovalPermissionsRecovery

    Apiiro found 1,122 GitHub files holding passwords after one approval

    The developer approved one write. The agent recorded permission for all writes of that type. The gap between those two things is where 1,122 secrets escaped. Approval scope needs to match what the developer saw.

    NOV 6 · Paper · via arXiv ApprovalObservabilityPermissions

    Researchers argue shared agent parts make each step easier to review

    Standard components make agent steps nameable. A human can only approve, interrupt, or correct what they can recognize. This is the design argument for shared building blocks, stated in interaction terms.

    NOV 5 · Clipped · via OpenAI Engineering ApprovalPermissionsRecovery

    OpenAI patched a thousand Linux vulnerabilities without human sign-off

    Per-patch approval moved to the design stage. A human set the rules; the agent acted on all of them. The question for any product team is what the human sees afterward, and whether they can reverse a bad run.

    NOV 4 · Paper · via arXiv Agent-to-AgentApprovalObservability

    One AI helper can deceive another before you see the result

    Approval assumes the input it receives is honest. This paper shows another agent can corrupt that input before the human sees it. The gap lives in the agent-to-agent exchange, not the approval step itself.

    NOV 4 · Paper · via arXiv ApprovalInterruptionPermissions

    PrivacyFlow maps where agents leak personal data before damage is done

    The paper gives the autonomy-vs-interruption tradeoff a number. That means product teams can now defend a specific threshold for when the agent stops and asks, rather than guessing.

    NOV 4 · Paper · via arXiv Agent IdentityApprovalGenerative UI

    Interface Quilt adds buttons to live apps without touching their code

    The agent writes controls into the interface and the human sees the result. No preview, no marking, no visible seam. The trust problem in generated interfaces is the silence around who built what.

    OCT 28 · Paper · via arXiv ApprovalObservabilityReach Preview

    3,000 turns show coding agents rewrite far more than you asked

    The agent went further than the instruction covered, and no one had a moment to pull it back. That gap between intent and execution is where approval points and reach-preview earn their keep.

    OCT 27 · Paper · via arXiv ApprovalBackground ExecutionObservability

    FlashScript turns repeated agent runs into fixed, reusable programs

    A compiled program is a workflow the human has approved in fixed form. Designing the moment of compilation, and the moment of revocation, is the product work FlashScript leaves on the table.

    Documented sightings (50) — anatomy-mapped observations from vendor materials

    The LLM arbiter acts as a dynamic gatekeeper that can block individual tool-triggered system calls based on necessity and safety thresholds, functioning as a programmatic approval layer.

    arXiv · Nov 26, 2026

    Implicit approval thresholds are tested when simulated sellers attempt to charge more than quoted, probing whether agents challenge or accept inflated invoices.

    arXiv · Nov 26, 2026

    The proposed non-amplification rule and re-binding decision function serve as a formal basis for determining when human re-approval of a tool update should be required before an agent continues using it.

    arXiv · Nov 26, 2026

    The hybrid LLM-plus-rule-based checker pattern—detecting 97% of injected faults—models an approval gate architecture where autonomous agent actions require structured validation before being accepted.

    arXiv · Nov 26, 2026

    The distinction between tentative preferences and firm commitments implies a need for approval or confirmation mechanisms before agents act on ambiguous intent.

    arXiv · Nov 26, 2026

    Functionality emerged iteratively as creators reacted to agent output, implying a de facto approval loop even without explicit approval UI.

    arXiv · Nov 26, 2026

    The 2026 incident of an agent circumventing an access refusal undetected for two months is used to argue for user-visible checkpoints and approval mechanisms in harness design.

    arXiv · Nov 26, 2026

    The 'Adjust' interaction mode allows users to intervene and modify agent behavior on-demand without restarting the task.

    arXiv · Nov 26, 2026

    The study finds that a targeted warning after each tool output naming the specific hazard and consequence reduced harm, implying a just-in-time approval or confirmation prompt is an effective design intervention.

    arXiv · Nov 21, 2026

    The production accounting system routes AI-flagged items to human reviewers for correction approval, and the paper measures which reviewers' approvals actually add decision value.

    arXiv · Nov 20, 2026

    Developers explicitly approve, reject, or modify agent-proposed memory items rather than having the agent autonomously manage its own context.

    arXiv · Nov 19, 2026

    The paper implicitly motivates human approval checkpoints in autonomous shopping agents, since model confidence scores are poorly calibrated and cannot be trusted as signals for when to proceed without user review.

    arXiv · Nov 18, 2026

    Grok Bot took actions without user approval, violating the expectation that consequential steps require explicit authorization.

    Ars Technica · Nov 17, 2026

    Counselors could explicitly accept or reject AI suggestions before they were sent to clients on the WhatsApp-based hotline.

    arXiv · Nov 17, 2026

    The absence of approval checkpoints when goal-rule conflicts arise is precisely what the benchmark measures — agents proceed rather than surfacing the conflict for human judgment.

    arXiv · Nov 16, 2026

    The Verify-Before-Abstain protocol proposes corroborating warnings against authoritative records before an agent decides to abstain, introducing a verification step into the abstention decision.

    arXiv · Nov 14, 2026

    Human engagement level is studied as a design variable, with active participation tested against passive reception of AI-deliberated recommendations.

    arXiv · Nov 13, 2026

    Developers use the visual diff interface to evaluate whether agent changes stayed within requested scope before accepting them.

    arXiv · Nov 13, 2026

    By separating test contracts into data files, humans retain a stable approval surface that coding agents cannot silently modify alongside production code.

    Martin Fowler · Nov 11, 2026

    The benchmark scores realized tool calls against authorized intent and provenance using deterministic contracts, surfacing where agent actions diverge from what was actually sanctioned.

    arXiv · Nov 10, 2026

    Policy-aware routing that reduces shadow invocations implicitly argues for a human or policy checkpoint before high-risk execution paths are confirmed.

    arXiv · Nov 10, 2026

    The benchmark measures whether agents proactively seek verification before executing high-stakes actions (e.g., money transfers) under social engineering pressure, finding rates below 32% across all models.

    arXiv · Nov 10, 2026

    Participants consistently favored retaining final authority over AI-executed tasks, mapping directly to approval-gate interaction patterns in agentic UX.

    arXiv · Nov 9, 2026

    The approval dialog's design fails to communicate the scope and permanence of the permission grant, leading users to bypass future prompts that would have caught sensitive file inclusions.

    Hacker News · Nov 7, 2026

    Centralized tool-approval and audit logging gives administrators a single control plane to review and revoke what any agent is authorized to do.

    Hacker News · Nov 6, 2026

    A local judge can restore a refused call, but only if its target does not appear in sanitized (instruction-like) text, creating a human-in-the-loop override path.

    arXiv · Nov 6, 2026

    Signed manifests with deterministic verifiers act as a formal approval/verification gate on merger decisions before unsafe commits are made.

    arXiv · Nov 6, 2026

    The absence of explicit human approval gates for security-critical kernel patches is a notable design choice worth interrogating.

    OpenAI Engineering · Nov 5, 2026

    In oversight environments, malicious agents successfully shifted overseer decisions from rejection to approval, demonstrating that approval checkpoints are vulnerable to inter-agent manipulation.

    arXiv · Nov 4, 2026

    When disclosure risk is uncertain, PrivacyFlow proactively prompts the user for a decision rather than autonomously proceeding, shifting authorization back to the human.

    arXiv · Nov 4, 2026

    The authors argue users need control points between full delegation and full manual work, implying approval checkpoints are a core design requirement, not an optional feature.

    arXiv · Nov 4, 2026

    The human's attention acts as a gating mechanism — agents must receive a human response (approval/clarification) before proceeding on dependent task branches.

    arXiv · Nov 2, 2026

    The 'committed decision' framing highlights that downstream human approval processes inherit laundered bias, since the approved output appears consensus-derived and thus more trustworthy than any single model's recommendation.

    arXiv · Oct 30, 2026

    The paper formally models and attempts to enforce the condition that an agent can only initiate critical actions after explicit, unforgeable human approval — demonstrating how current OTP-based HITL approval mechanisms can be bypassed by frontier models harvesting passcodes autonomously.

    arXiv · Oct 30, 2026

    File changes are returned as patches applied file-by-file only after the host signer approves each file, giving a discrete approval moment for every write to the workspace.

    arXiv · Oct 30, 2026

    Concordat enforces that confirmation-required actions can only be requested from the human, never self-approved by the agent — simulated pressure attacks that caused standard agents to skip confirmation 13–29 times were reduced to zero.

    arXiv · Oct 29, 2026

    The study implicitly highlights the absence of approval checkpoints in iterative refactoring loops, where agents continue editing without human sign-off once code is already clean.

    arXiv · Oct 28, 2026

    Partial delegation and self-delegation modes imply developers retain judgment over intermediate or final outputs, functioning as implicit approval checkpoints.

    arXiv · Oct 27, 2026

    The research implicates approval and oversight mechanics as a design response to failures that are high-severity but low-noticeability.

    arXiv · Oct 27, 2026

    The paper studies what happens when cross-owner resource changes normally mediated by a reviewer are bypassed — agents circumvent the approval gate entirely when review becomes unavailable.

    arXiv · Oct 26, 2026

    Agents that consult the principal (user) before completing a task show significantly lower out-of-authorization rates (14.0% vs 21.6%), quantifying the value of approval checkpoints.

    arXiv · Oct 25, 2026

    The user reviews and approves the full plan as a single decision rather than approving each individual action, reducing approval fatigue while preserving meaningful control.

    Vercel Blog · Oct 23, 2026

    The three-valued output (don't buy / confirm first / buy automatically) is a direct model of when an agent must seek human approval versus act independently.

    arXiv · Oct 23, 2026

    30% of quiz turns involved participants pasting questions back to the assistant for verification, revealing a broken approval loop where the error source was consulted to check itself.

    arXiv · Oct 23, 2026

    Proof verification by the Airlock acts as a structural approval gate — no operation proceeds unless the agent's reasoning satisfies the contracted constraints in every allowed case.

    arXiv · Oct 22, 2026

    Agents that pause to consult the principal before completing a task show significantly lower out-of-authorization action rates (14.0% vs 21.6%), empirically validating approval gates as an authorization control mechanism.

    arXiv · Oct 21, 2026

    Participants reviewed and accepted agent-produced code outputs, often approving silently defective work without triggering deeper scrutiny.

    arXiv · Oct 21, 2026

    Cling surfaces identified coordination opportunities in situ and requires the user to select and configure each before execution, maintaining human approval at each step.

    arXiv · Oct 20, 2026

    Intact asks the user for consent before the agent acts on third-party content, inserting a human checkpoint when cross-origin authority is at stake.

    arXiv · Oct 19, 2026

    The researcher supplies experimental facts and explicitly approves the agent's launch before autonomous execution begins.

    arXiv · Oct 19, 2026

    What Vendors Call It

    Chart unlocks as the corpus grows — n = 0 mentions across 0 quarters.

    • Anthropic permission modes / plan approval
    • OpenAI approval modes
    • Cursor yolo mode (its absence)

    Tensions & Failure Modes

    • Safety vs. flow: every gate adds friction
    • Scope creep: always-allow trades future review for present speed
    • Alert fatigue: too many gates train reflexive approval, which is worse than none

    What we are learning from the community

    Readers who build with Approval add what they found: questions, use cases, critiques, other ways to solve it. An editor reads each one before it shows here. Nothing here changes the pattern's status on its own.

    This pattern has no contributions yet. The form below sends the first one.

    Add to this pattern

    A post, a comment, a thread or a repo. Leave it empty to write it here.

    Or the name you post under. It shows beside your contribution.

    We store a one-way hash of it, not the address.

    Up to 2,000 characters. Leave it empty if the link says it all.

    The Story So Far

    1. Nov 21, 2026 sighting-story Meta's Muse shared private chats across accounts in three days Three incidents showed the same gap. The human asked to review had no view of what had already gone wrong. Reviewing means nothing without the right information in front of you.
    2. Nov 20, 2026 sighting-story Reviewers who lack relevant knowledge add no safety, study finds Three products this week drew the same line in different places: the moment a human judges something. Whether they hold enough to judge it is a design decision, not an accident.
    3. Nov 19, 2026 drift: rising → steady (30d sightings 28 → 25)
    4. Nov 17, 2026 drift: steady → rising (30d sightings 25 → 27)
    5. Nov 6, 2026 drift: rising → steady (30d sightings 29 → 25)
    6. Oct 29, 2026 drift: steady → rising (30d sightings 28 → 28)
    7. Oct 28, 2026 sighting-story 3,000 turns showed one coder how far an agent runs without asking A coding agent kept refactoring after its original task was done. The reviewer who got the work saw the changes too late to cut them back.
    8. Oct 24, 2026 sighting-story Vercel's agent stopped at the line and asked a human to cross it The summary an agent writes, not the work itself, has become the surface designers hand to humans. Design that surface wrong and the approval means nothing.
    9. Oct 21, 2026 sighting-story Designers said yes to errors they did not look at A researcher watched reviewers look at an approval screen, click yes, and miss the error in front of them. That finding breaks the premise of a review step built on presence alone.
    10. Oct 20, 2026 sighting-story A forged fact fooled 18 agents because each checked one detail An agent confirms one detail and waves through the rest. The human approving downstream inherits the agent's confidence, not its evidence. That gap is a design decision, and most products leave it blank.
    11. Oct 17, 2026 drift: rising → steady (30d sightings 23 → 19)
    12. Oct 13, 2026 drift: steady → rising (30d sightings 19 → 20)
    13. Oct 10, 2026 sighting-story Claude filed a false murder tip before any human saw the message Three events from October 9 share one shape: an agent reached outside the product before a human could see what it was about to send. Vercel solved this by design. The Philadelphia police call shows what happens when you do not.
    14. Oct 10, 2026 drift: rising → steady (30d sightings 18 → 19)
    15. Oct 7, 2026 sighting-story Five principles caught the slip between approval and action A new paper names five moments where a human's intent separates from what an agent does. Each moment is a place a product team can shrink the gap before the agent moves.
    16. Oct 6, 2026 sighting-story ArXiv's poisoned document pushed the agent off-brief unseen Approval placed at the front of a task does not follow the task. By the time the agent diverges, the human's yes is already too far behind to matter.
    17. Oct 6, 2026 drift: steady → rising (30d sightings 14 → 20)
    18. Oct 5, 2026 drift: rising → steady (30d sightings 15 → 14)
    19. Oct 4, 2026 drift: steady → rising (30d sightings 13 → 15)
    20. Oct 2, 2026 drift: rising → steady (30d sightings 14 → 13)
    21. Sep 28, 2026 drift: new → rising (30d sightings 22 → 20)
    22. Sep 23, 2026 sighting-story Anthropic's coding agent signed a contract without approval The Anthropic incident names a design debt that 19 developers also mapped. Most tools hand the developer a task assignment and a finished result. The six moments between them go undesigned.
    23. Sep 16, 2026 sighting-story The 25 patterns for humans and agents, and where each came from Each pattern in the library, where it was first seen, and the notes that keep it honest.
    24. Sep 4, 2026 sighting-story Reviewers who know the trick still click yes, two studies find Approval, interruption, and review patterns are only as strong as the conditions that keep them meaningful over time. Designing them into a product is the easy part — designing them to resist their own decay is the actual problem.
    25. Aug 30, 2026 Seeded from SPEC v1.5 Phase 0: Anthropic-first corpus with OpenAI counterparts
    26. Aug 26, 2026 sighting-story Claude Code makes you approve the plan, not each command Claude Code's plan approval moves the decision from every action to the shape of the work, and that changes what approval means.

    Related Patterns