Skip to content

fix(serve): wake Instances in same-account server-added Rooms - #61

Merged
xisen-w merged 3 commits into
codex/bootstrap-basefrom
fix/cross-room-instance-wake
Oct 19, 2026
Merged

xisen-w merged 3 commits into
codex/bootstrap-basefrom
fix/cross-room-instance-wake

Conversation

@xisen-w

@xisen-w xisen-w commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Aicoo can seat an existing SharedNet Instance in a new Room and send an exact @ mention, but sharednet serve previously watched only Room credentials already stored on the Agent's machine. The message therefore remained registered on the server without waking the real Agent.

This change makes serve reconcile active server memberships for each exact local Instance. A same-account Room added through REST or MCP now enters the normal per-Room delivery loop and replies in that Room. Cross-account invitations do not inherit local wake authority and still require an explicit local join.

The independent review also covered the real aicoo ordering where room_create(with:[agent]) and brief #1 both exist before serve --run discovers the Room. Remotely admitted command seats now start at their admission place and filter for the exact Instance mention, so they hear that first brief without replaying an old, unaddressed Room.

The implementation also:

  • creates discovered credentials atomically without overwriting a concurrent local join;
  • revalidates the Instance session and wake binding after the network read;
  • keeps serve --run discovery ephemeral so it cannot poison later session wake;
  • keys push doorbells by (Room, Instance) so one Room cannot overwrite another Room's secret;
  • persists and resumes each Room's independent ack cursor;
  • aborts an in-flight discovery request during shutdown.

Known interface limit: the resumed coding session keeps its original working directory. The wake identifies the remote Room, and command adapters receive SHAREDNET_ROOM_ID, but a bare in-turn sharednet read/say still resolves through the original project directory.

Validation at exact head 65dd80c999e95708224140b8e9daabb36471c187:

  • GitHub CI green on Node 22.18, 24, and 26, plus secrets scan
  • 471 Vitest tests passed, 1 skipped
  • 16 process tests passed, including both cross-Room discovery orderings
  • typecheck, build, export check, and installed-package smoke passed
  • exact candidate sharednet-0.1.16.tgz SHA-256 ad7731d8ebdc5e7a26666ccc98325b4bc8e2ee851dd8c0e66515b65db22616ba

The earlier hosted HTTP-handler proof showed same-Principal discovery, cross-Principal rejection, one exact wake, reply isolation, and ack advancement. It was produced from the pre-review head; the exact current-head ordering regression is enforced by CI.

[Hosted HTTP-handler verification evidence]((hosted evidence link removed from this public PR because it carried an access key))

This PR does not publish npm or change a production listener.

xisen-w and others added 3 commits October 19, 2026 14:34
Reconcile same-account server memberships for exact local Instances so authorized MCP clients can seat and mention an existing Agent without a second local join. Preserve local wake authority, per-Room push secrets, and the existing delivery/ack path.

Co-authored-by: OpenAI Codex <codex@openai.com>
Bind the initial server-membership scan to the caller's stop signal so shutdown cannot wait for the request timeout.

Co-authored-by: OpenAI Codex <codex@openai.com>
aicoo seats an agent with `room_create {with:[agent]}` and posts the
brief at #1 at once, before any serve has looked at /rooms. A driven seat
already starts such a Room at its admission place, but a `serve --run`
connector is not driving, so a newly discovered Room with no local
cursor started at the Room's end: the brief was acknowledged unread and
that run never woke for it.

A Room found only by discovery was never joined on this machine, so it
has no history to skip. Under --run it now starts at the service's kept
place and, like a driven seat, wakes only on a line that addresses this
Instance. That way the brief is heard, and an old Room admitted long ago
hands over nothing until someone @s it.

The new process test posts the brief before serve starts, under --run.
It fails on 6edc77f and passes here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xisen-w
xisen-w merged commit 1921657 into codex/bootstrap-base Oct 19, 2026
4 checks passed
xisen-w added a commit that referenced this pull request Oct 19, 2026
An independent fact-check against 1921657 found two inaccurate sentences.
A discovered Room does not "hand over nothing": its first mention carries
everything since the kept place, and unlike a join it does not skip to
the newest lines. And #56's lease keeps the Room showing the seat as
replying past the old 20-minute window; it does not stop redelivery.

Also state that #58's hosted no-model gate for the serve-backed modes
was not run, add #61's known working-directory limit, and note that the
driven binding must agree across an Instance's seats while --run uses
its command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xisen-w added a commit that referenced this pull request Oct 19, 2026
* chore(cli): refresh the 0.1.16 release notes for #51-#61

The 0.1.16 notes were finalized in #49, but #51, #55, #56, #58, #59 and
#61 merged after that into the same unpublished version. The owner has
authorized the release, so record their operator-visible behavior first,
as CONTRIBUTING requires: same-account Room discovery, delivery-lease
renewal, and the versioned harness modes.

Also record the release evidence and its limits. The tarball packed from
the merged #61 commit is byte-identical to the reviewed artifact, and it
was run as a production listener before publishing. That covers the
live-listener and hosted-API gates #58 left open for serve. The
serve-backed research modes still have no hosted or model-backed run, so
the notes say so instead of implying it.

Docs only: the packed tarball does not include docs/, so the artifact
being published is unchanged.

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

* docs(cli): correct the 0.1.16 notes on discovery backlog and leases

An independent fact-check against 1921657 found two inaccurate sentences.
A discovered Room does not "hand over nothing": its first mention carries
everything since the kept place, and unlike a join it does not skip to
the newest lines. And #56's lease keeps the Room showing the seat as
replying past the old 20-minute window; it does not stop redelivery.

Also state that #58's hosted no-model gate for the serve-backed modes
was not run, add #61's known working-directory limit, and note that the
driven binding must agree across an Instance's seats while --run uses
its command.

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

---------

Co-authored-by: Claude Opus 5.5 <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