Skip to content

feat(monitoring): CrossSessionCoordinator — light advisory cross-session signal#500

Open
JKHeadley wants to merge 1 commit into
mainfrom
echo/cross-session-intent-beacon
Open

feat(monitoring): CrossSessionCoordinator — light advisory cross-session signal#500
JKHeadley wants to merge 1 commit into
mainfrom
echo/cross-session-intent-beacon

Conversation

@JKHeadley

Copy link
Copy Markdown
Owner

What & why

Concurrent Claude Code sessions on one agent home share .instar/ state but are blind to each other. The damaging incident (2026-05-28, topic 15579): one session built a fix while another "hit the safety brake" — flipped a feature flag off and mass-withdrew 19 commitments. Both reached a correct local diagnosis; neither knew the other was acting. Net: bug fixed, engine left off, test bed wiped.

Justin approved a LIGHT fix (chosen from a light/medium/heavy menu): a visible "I'm about to do X" signal, no hard locks — "learn to collaborate slowly and smoothly."

The fix

CrossSessionCoordinator — a shared, append-only scratchpad of recent high-impact structural actions + voluntary intents. Any structural action surfaces other recent entries by a different/unknown session as an advisory coordinationWarning. It never blocks and never mutates target state — purely advisory.

  • Routes: POST /coordination/intent, GET /coordination/recent
  • Backstop auto-record (no reliance on the agent remembering to announce): sensitive PATCH /config flips + POST /commitments/:id/withdraw record themselves and attach coordinationWarning to their own response
  • Wired in AgentServer (always alive → GET 200 not 503) + CapabilityIndex entry
  • Default-ON housekeeping, near-silent (no Telegram); audit at logs/cross-session-events.jsonl
  • Actor resolution is session-level only (X-Instar-Session), never the agent id (which all sessions share and would wrongly suppress the warning)

Design decisions (see convergence report)

  • Single-source recording of withdrawals in the route handler (not the CommitmentTracker event) — avoids double-count; the route is the single agent-facing path and gives the inline warning for free.
  • Intents are never deduped (events, not states). A regression test locks this — an earlier dedup keyed on kind+target+value collapsed two distinct intents into one and suppressed the warning; caught during implementation review and fixed.

Migration parity

Config default in ConfigDefaults.SHARED_DEFAULTS (propagates via applyDefaults), migrateClaudeMd awareness section + generateClaudeMd template. All unit-tested.

Tests (all three tiers + parity)

  • Unit (16) · Integration (8, both incident vectors over live HTTP) · E2E lifecycle (6, real AgentServer → feature alive) · migration-parity (5) · ConfigDefaults assertion. Green locally.

Out of scope (deliberate)

Spec: docs/specs/cross-session-coordination.md (converged + approved) · ELI16: docs/specs/cross-session-coordination.eli16.md · side-effects: upgrades/side-effects/cross-session-coordination.md

🤖 Generated with Claude Code

@vercel

vercel Bot commented May 29, 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 29, 2026 3:52am

Request Review

…ion signal

Concurrent Claude Code sessions on one agent home share `.instar/` state but are
blind to each other. The damaging incident (2026-05-28): one session built a fix
while another flipped a feature flag off + mass-withdrew 19 commitments — neither
knew the other was acting. Justin approved a LIGHT fix (topic 15579): a visible
"I'm about to do X" signal, no hard locks; "learn to collaborate slowly."

CrossSessionCoordinator: a shared append-only scratchpad of recent high-impact
structural actions + voluntary intents. Any structural action surfaces other
recent entries by a different/unknown session as an advisory `coordinationWarning`.
It never blocks and never mutates target state — purely advisory.

- Routes: POST /coordination/intent, GET /coordination/recent
- Backstop auto-record: sensitive PATCH /config flips + commitment withdrawals,
  attaching coordinationWarning to the action's own HTTP response
- Default-ON housekeeping, near-silent (no Telegram); audit at
  logs/cross-session-events.jsonl
- Wired in AgentServer (always alive → GET 200 not 503) + CapabilityIndex entry
- Migration parity: ConfigDefaults default + migrateClaudeMd awareness section +
  generateClaudeMd template
- Docs: CrossSessionCoordinator + /coordination routes in the docs site (docs-coverage)
- Tests: unit (16) + integration (8) + e2e lifecycle (6) + migration parity (5)

Spec: docs/specs/cross-session-coordination.md (converged + approved, topic 15579)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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