Skip to content

Morning skill: Add checkpoint/resume for API error recovery #41

@omriariav

Description

@omriariav

Problem

During the v0.3.0 QA session, API errors (500 Internal Server Error, 529 Overloaded) caused ~15 minutes of delays. When errors occur mid-triage:

  • Progress is lost (which emails were already processed)
  • User has to re-orient ("what's going on?")
  • Sub-agent results may be partially completed but not captured

Proposed Solution

Add checkpoint/resume capability to the morning triage workflow:

1. Progress Tracking File

Write triage progress to a scratchpad file after each step:

# ~/.config/gws/morning-session.yaml (or scratchpad)
session_start: "2026-01-28T11:30:00"
step: "guided_triage"
processed_ids:
  - {id: "19c03ccbb5b0a4b1", action: "labeled_and_archived", label: "14 - PRIVACY"}
  - {id: "19c03d469a0abd5d", action: "archived"}
auto_handled:
  - {id: "19c02c2f11a6db5b", action: "noise_archived"}
pending_review:
  - {id: "19c0354c4e4b272d", category: "REVIEW", priority: 2}
triage_results_cache: "/path/to/triage-results.json"

2. Resume on Error

If the session is interrupted:

  • On next /morning run, detect the checkpoint file
  • Ask: "Resume previous session (N items remaining) or start fresh?"
  • If resume: skip already-processed emails, continue from checkpoint

3. Triage Agent Results Cache

Triage agents write their output to a scratchpad file in addition to returning it. If the main agent crashes after triage but before presenting results, the cached output can be re-read.

Impact

  • Eliminates progress loss on API errors
  • Better UX during outages
  • Enables longer triage sessions without risk

Complexity

High — requires changes to SKILL.md workflow, scratchpad file management, and resume logic.

Related

  • Morning skill v0.3.0 QA session findings
  • API errors observed: 500 (Internal Server Error), 529 (Overloaded)

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