Skip to content

docs(spec): Agent Sleep Mode design (Level 3 — draft for review)#594

Open
JKHeadley wants to merge 1 commit into
mainfrom
echo/agent-sleep-spec
Open

docs(spec): Agent Sleep Mode design (Level 3 — draft for review)#594
JKHeadley wants to merge 1 commit into
mainfrom
echo/agent-sleep-spec

Conversation

@JKHeadley

Copy link
Copy Markdown
Owner

Design spec only — status: draft, NOT approved for build. Authored during the autonomous Responsible Resource Usage run as the durable design for the standard's largest facet (Level 3 — idle agent → near-zero footprint, wake on message), so the eventual build is de-risked.

What it designs

  • The 3 components: lifeline (always-on ear — must stay up to wake), server (the heavy sleep target), MCP children (Claude-owned; already zero when no session runs).
  • Stage A — SOFT sleep (incremental, near-zero risk): server stays up but every non-essential poller backs off when idle, via the already-shipped IdleAwareCadence (PR feat(monitoring): idle-aware poller cadence (IdleAwareCadence + TokenLedgerPoller) #591) + a shared idle signal. Roll out one verified-safe poller per PR (the silently-stopped trio, StaleSessionBackstop, PresenceProxy, OrphanProcessReaper, SessionReaper — all have nothing to do with zero sessions).
  • Stage B — HARD sleep (high-value, high-risk): supervisor stops the server on deep idle; the lifeline buffers the inbound message, writes wake-requested.json, respawns the server (reusing the proven restart-requested.json handshake), replays the buffered message (zero loss).
  • Hard constraints: never miss a wake; multi-machine lease must hand off before sleep; scheduled jobs arm a wake timer; /health answerable while asleep.

Recommendation

Ship Stage A incrementally (one poller/PR); treat Stage B as its own converged spec + project (the lifeline wake-respawn handshake is the risky part). Needs /spec-converge + your approved: true before any code.

🤖 Generated with Claude Code

…sage)

Design-only spec (status: draft, NOT approved for build) for the largest facet of
the standard: idle agent → near-zero footprint, wake on message. Authored during
the autonomous run as the durable design so the build is de-risked.

Designs the 3 components (lifeline=always-on ear, server=sleep target, MCP children
=Claude-owned/already-zero-when-sessionless) and two staged models: Stage A SOFT
sleep (server up, all non-essential pollers back off via the shipped IdleAwareCadence
+ a shared idle signal — incremental, near-zero risk) and Stage B HARD sleep
(supervisor stops the server on deep idle; lifeline buffers the inbound message,
writes wake-requested.json, respawns; reuses the proven restart-handshake). Captures
the hard constraints: never miss a wake, multi-machine lease must hand off before
sleep, scheduled jobs arm a wake timer, /health answerable while asleep.

Recommends shipping Stage A incrementally (one poller/PR, each verified safe) and
treating Stage B as its own converged spec + project. Needs /spec-converge + Justin's
approval before any code.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
instar Ready Ready Preview, Comment May 31, 2026 2:31am

Request Review

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.

1 participant