Skip to content

Continuation checkpoints: StopFailure hook only matches rate_limit, so model-down failures trigger no save #8

Description

@coldlogicAI

Found while reviewing checkpoint coverage against Claude Code's current hooks reference.

Problem

The Claude Code onboarding wires the StopFailure hook with matcher rate_limit only (src/cli/mcp-config-claude-code.ts, StopFailure:rate_limit in the continuation config enum). But Claude Code's StopFailure event distinguishes many failure types: rate_limit, overloaded, server_error, max_output_tokens, authentication_failed, billing_error, unknown, and others.

Result: when the model itself dies — API overloaded, server error, output-token cap — no fallback checkpoint is written. Those are exactly the deaths a continuation checkpoint exists for, and they are indistinguishable from a rate limit from the user's chair.

Failure scenario

Session is mid-task with accumulated task state. The API returns overloaded. The turn ends, the StopFailure hook fires with matcher overloaded, nothing matches, no packet is written. The next session starts with no checkpoint offer, even though the deterministic fallback (task scratchpad + git state) needed no model call and could have completed.

Suggested fix

Widen the default matcher to the failure types that mean 'the session is over through no fault of the work': rate_limit|overloaded|server_error|max_output_tokens|unknown — or make the matcher list configurable alongside the existing continuation.claudeCode.events. The deterministic script fallback already works for all of these; only the trigger is missing.

Activity

  1. coldlogicAI commented on Aug 9, 2026

    @coldlogicAI
    OwnerAuthor

    Still valid and orthogonal to the durable-inbox / beyond-local roadmap filed after PR #9.

    Roadmap issues (transport hardening, not continuation hooks):

    • multi-machine recipes / notice signals
    • encryption at rest
    • authorship / signing
    • authenticated remote transport

    This issue remains: widen StopFailure matchers beyond rate_limit so model-down deaths still write checkpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions