Hmbown/CodeWhale · error

Agent {agent_id} has no continuable checkpoint to resume fro

Error message

Agent {agent_id} has no continuable checkpoint to resume from (continuable={continuable}, messages={messages})

What it means

A resume needs a checkpoint marked continuable with at least one stored message; this error reports that the agent's checkpoint is absent, marked non-continuable, or empty (the message embeds continuable and message-count flags for diagnosis). It usually means the child was interrupted before it processed anything, crashed before its first checkpoint write, or its checkpoint was invalidated on terminal completion.

Source

Thrown at crates/tui/src/tools/subagent/mod.rs:5700

            if !resumable {
                return Err(anyhow!(
                    "Cannot resume agent {agent_id}: status is {} ({})",
                    subagent_status_name(&agent.status),
                    policy.describe()
                ));
            }
            let checkpoint = agent
                .checkpoint
                .as_ref()
                .filter(|cp| cp.continuable && !cp.messages.is_empty())
                .ok_or_else(|| {
                    let continuable = agent.checkpoint.as_ref().is_some_and(|cp| cp.continuable);
                    let messages = agent
                        .checkpoint
                        .as_ref()
                        .map(|cp| cp.messages.len())
                        .unwrap_or(0);
                    anyhow!(
                        "Agent {agent_id} has no continuable checkpoint to resume from (continuable={continuable}, messages={messages})"
                    )
                })?;
            // Restore the interrupted child's write claim so the resumed loop
            // stays inside the coordination ledger with the original bounded
            // scope instead of inheriting the caller's unchecked write surface.
            // The ledger claim is already namespaced and carries the isolation
            // flag; both are passed through to the spawn seam.
            let claim = self
                .coordination
                .write_claims
                .iter()
                .find(|record| record.claim.owner == agent_id)
                .map(|record| (record.claim.clone(), record.isolated_worktree));
            // Preserve the interrupted child's runtime posture (read_only /
            // denied tools / shell) instead of rebuilding from the caller's
            // role, which could widen the resumed child's authority.
            let preserved_profile = self

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Inspect the agent's snapshot (get_result_by_ref) and check the checkpoint's continuable flag and message count before resuming
  2. If there is no usable checkpoint, spawn a fresh agent whose prompt summarizes what the interrupted agent was doing
  3. When interrupting programmatically, only interrupt after the child has completed at least one turn so a continuable checkpoint exists

Example fix

// before
let resumed = manager.resume_from_checkpoint_with_policy(
    handle, runtime, &id, &text, policy)?;

// after
let snap = manager.get_result_by_ref(&id)?;
let resumable = snap.checkpoint.as_ref()
    .is_some_and(|cp| cp.continuable && !cp.messages.is_empty());
if !resumable {
    return spawn_fresh_with_summary(manager, &id, &text).await;
}
let resumed = manager.resume_from_checkpoint_with_policy(
    handle, runtime, &id, &text, policy)?;
Defensive patterns

Strategy: validation

Validate before calling

// Require a usable checkpoint before attempting resume.
let snap = manager.get_result_by_ref(&agent_id)?;
let has_checkpoint = snap.checkpoint.as_ref()
    .is_some_and(|cp| cp.continuable && !cp.messages.is_empty());
anyhow::ensure!(has_checkpoint,
    "agent {agent_id} has no continuable checkpoint; respawn instead");

Type guard

fn checkpoint_resumable(snap: &SubAgentResult) -> bool {
    snap.checkpoint.as_ref()
        .is_some_and(|cp| cp.continuable && !cp.messages.is_empty())
}

Try / catch

On 'no continuable checkpoint', branch on the embedded continuable/messages flags: messages=0 means nothing to replay — respawn with the original task; continuable=false means the checkpoint was invalidated — respawn with any known partial output.

Prevention

When it happens

Trigger: Resuming an agent interrupted during its very first model turn (zero messages recorded); resuming after a crash that happened before the initial checkpoint persisted; a checkpoint whose continuable flag was cleared (e.g., consumed or invalidated by a terminal transition); interrupt_child building a minimal placeholder checkpoint with empty messages, then someone attempting to resume it.

Common situations: Users interrupting a child immediately after spawn and then pressing continue; crash-recovery flows assuming every Interrupted agent has usable history; checkpoints pruned by receipt compaction/archive settings.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/eeef62884d0a4dde. Report an issue: GitHub.