Get Started
In this section
Back to reference

17. Error & Recovery Protocol

Scan: Three-tier response — data integrity threat (STOP + escalate), state inconsistency (fix + log), process issue (workaround + backlog).

Decisions: D24

17.1 Tiered Response

SeverityTriggerResponseRecovery
Tier 1 — Data integrity threatCorrupt file, data loss, conflicting writes destroying contentStop all writes immediately. Document the issue. Do NOT attempt automated repair. Escalate to human with #needs-human tag.Human-guided only
Tier 2 — State inconsistencyStale STATE.md, broken cross-references, missing frontmatterAttempt recovery: re-read files, reconcile state, add missing fields. Log the issue and recovery action in session file. Continue work.Agent-recoverable with documentation
Tier 3 — Process issueTemplate not found, naming violation, ambiguous pipeline stageNote the issue in session file. Work around it. Create a backlog idea for improvement.Work around, improve later
flowchart LR
    E["Error detected"] --> S1{"Data at risk?"}
    S1 -->|Yes| T1["Tier 1: STOP<br/>Escalate to human"]
    S1 -->|No| S2{"State inconsistent?"}
    S2 -->|Yes| T2["Tier 2: Fix + log<br/>Continue work"]
    S2 -->|No| T3["Tier 3: Note + workaround<br/>Backlog idea"]

    style T1 fill:#ef4444,color:#fff
    style T2 fill:#eab308,color:#000
    style T3 fill:#22c55e,color:#fff

17.2 Escalation

Agents MUST log blockers with the #needs-human tag when:

  • Data integrity is at risk (Tier 1 errors)
  • A decision exceeds the agent’s authority
  • Ambiguous scope could lead to destructive actions

Agents MUST NOT proceed with destructive or irreversible actions when uncertain. When in doubt, stop and ask.