LearnNewsExamplesServices
Frontmatter
id10439
titleDocument wake-substrate auto-bootstrap in AGENTS_STARTUP.md (defense-in-depth)
stateClosed
labels
documentationenhancementai
assignees[]
createdAtApr 27, 2026, 9:22 PM
updatedAtApr 30, 2026, 11:13 AM
githubUrlhttps://github.com/neomjs/neo/issues/10439
authorneo-opus-ada
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 30, 2026, 11:13 AM

Document wake-substrate auto-bootstrap in AGENTS_STARTUP.md (defense-in-depth)

Closed v13.0.0/archive-v13-0-0-chunk-6 documentationenhancementai
neo-opus-ada
neo-opus-ada commented on Apr 27, 2026, 9:22 PM

Context

Closes the doc-side complement to #10437 / PR #10438, which delivered the substrate-level auto-invoke for WakeSubscriptionService.bootstrap() on MCP server boot. That fix is the load-bearing path: every new stdio-transport session auto-seeds its WAKE_SUBSCRIPTION node without any agent action required.

This ticket adds defense-in-depth at the discipline layer:

  1. Documents the auto-bootstrap behavior in AGENTS_STARTUP.md so agents know wake substrate is part of session initialization (currently invisible — agents have to trace the code to discover it).
  2. Adds an explicit "verify wake substrate" inbox-style Pre-Flight Check complementary to §22.1's mailbox-check, so agents catch edge cases where auto-invoke didn't fire (e.g., OIDC-mode SSE transport, which the substrate fix deliberately defers — see #10437's Out of Scope section).
  3. Closes the original #10402 AC item "AGENTS_STARTUP.md boot sequence invokes bootstrap so new sessions self-heal to a known-good subscription" — but reframed as defense-in-depth rather than load-bearing, now that the substrate auto-handles stdio mode.

Quick-win scope: pure doc change, no code touchpoints, no test surface needed. Filed for next-session pickup per @tobiu's authorization.

The Problem

After #10438 lands, the wake substrate auto-bootstraps on stdio MCP boot — fully self-healing for the dominant swarm path. But:

  1. Discoverability gap: agents have no documented signal that auto-bootstrap exists. New agents (or future-pruned context of existing agents) won't know to expect it, and won't know to check if it's missing.
  2. OIDC-mode coverage gap: the substrate auto-invoke is gated on aiConfig.transport !== 'sse' per the implementation. OIDC/SSE mode defers wake-substrate seeding to dispatch-time self-heal (filed as Out of Scope in #10437; will be a future ticket if/when OIDC is exercised). Until that lands, OIDC-mode agents need to bootstrap explicitly.
  3. Cross-harness asymmetry: Antigravity is also stdio mode today, so the substrate fix covers both swarm members. But future harness families (or future architectural shifts) might not be — defense-in-depth at the discipline layer survives that.

The Architectural Reality

  • AGENTS_STARTUP.md — the canonical boot protocol every agent reads at session start. Existing §6 already covers Memory Core healthcheck + mailbox check; wake-substrate readiness is a natural sibling.
  • AGENTS.md §22.1 (mailbox-check Pre-Flight) — the existing discipline-layer pattern for "verify substrate readiness at turn start." Wake-substrate Pre-Flight could mirror it.
  • WakeSubscriptionService.bootstrap() — the idempotent action; safe to call regardless of whether auto-invoke already ran (#10412 raw-SQL idempotency).

The Fix

Add a small section to AGENTS_STARTUP.md (likely near §6 Memory Core / §22 mailbox check, depending on file layout):

<h2 class="neo-h2" data-record-id="6">§N. Wake substrate readiness (defense-in-depth)</h2>

The Memory Core MCP server auto-invokes `WakeSubscriptionService.bootstrap()`
after stdio identity resolution at boot (per #10437 / PR #10438). For stdio-
transport sessions, this is fully automatic — your `WAKE_SUBSCRIPTION` node is
seeded before your first tool call.

For OIDC-mode SSE transport sessions (deferred per #10437's Out of Scope), or
as defense-in-depth on top of the auto-invoke, optionally call:

    manage_wake_subscription({action: 'bootstrap'})

at session start. Idempotent (per #10412): safe to call regardless of whether
auto-invoke already ran. Already-existing subs return `status: 'existing'`
without creating duplicates.

Pre-Flight Check shape (mirrors §22.1 mailbox-check):

> *"Pre-Flight: I verified my `WAKE_SUBSCRIPTION` is active via either (a)
>  observing the boot-log line `Wake subscription auto-bootstrap: created/existing`
>  in stdio mode, or (b) calling `manage_wake_subscription({action: 'bootstrap'})`
>  explicitly in OIDC mode / cold-cache scenarios."*

Plus a brief mention in AGENTS.md §22.1 cross-referencing this so the wake-substrate verification is reflexive at turn start, not just session start.

Acceptance Criteria

  • AGENTS_STARTUP.md documents the wake-substrate auto-bootstrap behavior
  • Documents the OIDC-mode + cold-cache exception (when explicit bootstrap() is needed despite auto-invoke)
  • References #10437 / PR #10438 / #10412 as the substrate-level mechanisms
  • Cross-references AGENTS.md §22.1 so the mailbox-check + wake-readiness checks are sibling Pre-Flights
  • Examples agents can copy verbatim (the manage_wake_subscription({action: 'bootstrap'}) call shape)

Out of Scope

  • The substrate-level auto-invoke (already shipped via #10437 / PR #10438)
  • OIDC-mode dispatch-time self-heal (deferred to a future ticket if/when SSE transport is exercised in production)
  • Integration test that asserts the AGENTS_STARTUP.md mandate is followed (discipline layer; tests would test the substrate, which #10437 already covers)
  • Renaming / restructuring AGENTS_STARTUP.md sections (additive only)

Avoided Traps

  • Trap: Reframe the substrate-level fix as redundant-with-doc-mandate. Avoided: doc-mandates depend on agent compliance + survive context-pruning poorly per the #10437 framing. The substrate-level fix IS load-bearing; this ticket is genuinely defense-in-depth.
  • Trap: Make the AGENTS_STARTUP.md mandate the primary path. Avoided: future agents won't reliably read it through context-pruning; substrate-level auto-invoke must remain canonical.
  • Trap: Auto-bootstrap silently EXPECTS to be the only path; doc tells agents NOT to call bootstrap explicitly to "avoid duplicates." Avoided: the call is idempotent per #10412 — explicit redundant calls are safe and recommended for OIDC + cold-cache.

Related

  • Substrate-level mechanism: #10437 / PR #10438 (auto-invoke at MCP server boot)
  • Original AC source: #10402 (Phase 1 wake substrate self-healing — this closes the doc-side AC item)
  • Idempotency that makes redundant calls safe: #10412
  • Adjacent discipline-layer Pre-Flight pattern: AGENTS.md §22.1 (mailbox-check)

Origin Session ID: b3c0bfb8-44e1-4646-9c62-110ef16b0fad

Retrieval Hint: "AGENTS_STARTUP wake substrate bootstrap defense-in-depth Pre-Flight #10402 doc-side"