Skip to content

Add agent save/resume for automated working state - #19

Merged
coldlogicAI merged 2 commits into
mainfrom
agent/2026-09-06-agent-resume
Sep 7, 2026
Merged

coldlogicAI merged 2 commits into
mainfrom
agent/2026-09-06-agent-resume

Conversation

@coldlogicAI

Copy link
Copy Markdown
Owner

Closes #18.

Problem

Agents cannot persist and recover working state without a human in the loop. SessionStart offered a continuation once and told Claude not to load it until the user confirmed. Same-repo continuity was deferred to git and CLAUDE.md, so 3Notch was unused for automated agentic workflows.

Change

  • notch save writes a continuation packet from the current Git snapshot plus optional --summary / --next-steps (stdin accepted). Secret scan still blocks. Packets are tagged continuation / stream-<stream> / source-save and supersede the latest same-stream checkpoint.
  • notch resume prints the latest continuation for this store with no confirm prompt. Empty store is quiet success; --json returns "checkpoint": null. --include-private is required to resume private packets.
  • Claude Code SessionStart injects the checkpoint body into additionalContext. It does not offer approve-then-get_packet as the happy path and still does not read transcript_path.
  • MCP save_working_state and resume_working_state match the CLI. Private packets stay hidden unless the server starts with --include-private.
  • AGENTS.md, README, continuation guide, and Codex/Grok/Cursor prompts: wrap-up is notch save; session start is notch resume. No daemon.

Migrations: none.

Testing

  • npm run lint — pass
  • npm run type-check — pass
  • npm run build — pass
  • npm test — 250 passed
  • npm run test:e2e — 24 passed
  • Built CLI smoke: node dist/cli/index.js --help lists save and resume

Review

Diff-scoped review: the change does what issue #18 claims (save, resume, SessionStart body injection, MCP parity, docs, tests). This is not a system review of packet integrity, inbox, or hook coverage beyond the files in this diff.

Not checked

  • Visual / live Claude Code SessionStart against a real Claude Code process
  • Existing stores whose allowedMcpWriteTools predates save_working_state (re-onboard or add the tool to config)
  • Website publish of the continuation-checkpoints HTML mirror
  • Cross-product behavior (iPSM, Derive)
  • Whether prompt-mode still asking before creating a semantic checkpoint is the right long-term create policy (load path is automatic; create path is unchanged)

Agents persist and load working state with notch save / notch resume
and MCP save_working_state / resume_working_state. SessionStart injects
the latest continuation body. Same-repo continuity is in scope.
SessionStart follows continuation.sensitivity. Resume stays on the
current stream. Onboard/site no longer say load waits for a human.
@coldlogicAI

Copy link
Copy Markdown
Owner Author

Cross-model review (Claude Sonnet, read-only): request-changes.

Addressed:

  • onboard default README no longer says load waits for confirmation
  • SessionStart does not inject private bodies unless continuation.sensitivity is private
  • resume no longer silently falls back to another stream
  • dead offeredCheckpointId write removed; re-inject on SessionStart kept (that is the agentic path)

Not checked by reviewer: they did not run the suite. Parent ran npm test (250), lint, type-check after the fixes.

@coldlogicAI
coldlogicAI marked this pull request as ready for review September 7, 2026 02:07
@coldlogicAI
coldlogicAI merged commit 836d3a1 into main Sep 7, 2026
4 checks passed
@coldlogicAI
coldlogicAI deleted the agent/2026-09-06-agent-resume branch September 7, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent save/resume: automatic working state for agentic loops

1 participant