Repository navigation
aiden serve sends its Bots' Needs you, Failed and last reply like a Mac - #913
sambitcreate wants to merge 30 commits into
Conversation
…erve With durable Bot sessions on, the headless server builds the same live Bot summary the desktop uses (conversation, state, queued inputs and whether an approval waits on the person). It feeds the host feed's Bot rows (needsYou, failed, lastReplyAt, preview), so a paired desktop's Bots list and Inbox show this server's Bots as they show a Mac's, and the router's botNeedsYou, so the server offers bot:needs-you to phones. The feed refreshes when a Bot's turn starts or ends, on a pause, and when an approval opens or settles. Without durable sessions nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ
…d and the last reply Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ
There was a problem hiding this comment.
Important
Normal Bot completions do not invalidate the host feed, so the last-reply and final-state signals this PR adds remain stale until an unrelated refresh.
Reviewed changes I reviewed the complete CLI projection, Remote lifecycle wiring, audience-gated Bot contract, documentation, and focused parity coverage.
- CLI Bot projection — Adds
createCliBotSignalsover the durable runtime to derive row signals and revision-68needsYousets. - Remote integration — Supplies those signals to the host feed and router, adds state/approval invalidation, and closes the projection during API teardown.
- Contracts and verification — Updates CLI/Remote documentation and extends parity tests for direct projection, capability negotiation, audience gating, and pause notifications.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
Follow a running Bot in the live projection, as the desktop does, so the end of every turn (reply or failure) invalidates the feed with its final row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ
There was a problem hiding this comment.
Important
A Bot turn that settles while its background projection is opening can still miss the final host-feed refresh and leave the row stale.
Reviewed changes I reviewed the settlement fix added since the prior Pullfrog review, including its runtime-state propagation, projection lifecycle, listener teardown, and focused parity coverage.
- Tracked running turns — Passed full durable session states into
BotLiveProjection.notifyStateso an active turn keeps a background transcript feed open. - Invalidated on settlement — Routed
BotLiveProjection.onRunSettledthrough the CLI signal listener set and detached the new subscriptions during teardown. - Exercised reply delivery — Added a gated durable turn that observes a newer
lastReplyAtand preview throughsignals.onChangeafter completion.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
A running notice whose feed opened after the run ended set the feed back to running and never reported the end, so the host feed missed the reply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ
There was a problem hiding this comment.
Important
A newer paused or interrupted state can still be replaced by the stale running notice while the live feed opens.
Reviewed changes I reviewed the projection-startup fix added since the prior Pullfrog review and its deterministic race coverage.
- Guarded delayed feed opening — Detected an already-settled feed after asynchronous startup, reported settlement, and avoided applying the captured
runningstate. - Covered idle completion — Delayed the projection's conversation read until a real Bot turn completed, then verified the settled callback, idle snapshot, and final reply.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
…with The feed reads the state as it opens, after the notice, so a pause or interruption in between kept reading running; report it settled instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ
There was a problem hiding this comment.
Important
A state transition can still be lost during the later part of feed opening, leaving a Bot row stale after this fix.
Reviewed changes I reviewed the projection-opening follow-up added since the prior Pullfrog review and its paused-state race coverage.
- Preserved an opened non-running state — Removed the stale captured-state application and reports settlement when a delayed feed opens paused, interrupted, failed, or idle.
- Covered pause before state projection — Added a deterministic test that holds the conversation read, pauses a live Bot, and verifies the opened snapshot remains paused.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
A notice that arrives while the feed opens may be older or newer than the state it read, so the state is read again inside the feed queue. A feed whose conversation closed while it opened (a pause can do that) is no longer kept with its stale state, and a run that ended meanwhile is still reported settled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ
…' into claude/project-thread-awyxuf-pr5
…/sambitcreate/aiden-agent into claude/project-thread-awyxuf-pr5
There was a problem hiding this comment.
Important
The new reconciliation can settle one Bot run twice when a terminal frame was pending during feed opening.
Reviewed changes I reviewed the feed-opening reconciliation added since the prior Pullfrog review, including successful and failed watch startup, settlement ordering, deterministic race coverage, and the shared desktop consumer.
- Reconciled opening state — Re-read the runtime state inside the opened feed queue so notifications arriving after the initial state read are reflected.
- Cleaned failed watch startup — Removed and cancelled a feed when a pause closes its conversation before the watch starts, then recovered settlement from a fresh state read.
- Covered post-read pause — Added a deterministic test that pauses after the opening state read and verifies the resulting paused snapshot and callback.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
The opening reconciliation and a run's last frame could both report the same run as settled. A feed now remembers that its run's end was reported and clears that when a new run starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ
…/sambitcreate/aiden-agent into claude/project-thread-awyxuf-pr5
There was a problem hiding this comment.
Important
The settlement latch still permits duplicate callbacks when a shared opening attempt fails during pause or interruption.
Reviewed changes I reviewed the settlement-deduplication follow-up and its lifecycle behavior since the prior Pullfrog review.
- Guarded successful settlement — Added a per-feed latch so opening reconciliation and a pending terminal frame report a completed run only once.
- Reset per new run — Cleared the latch when state or transcript frames establish a new active run.
- Covered the terminal-frame race — Added a deterministic test that completes a run after the opening state read and asserts one idle settlement callback.
@v0 or keep the SHA fresh with Dependabot | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏
Notices that join the same opening see the same error; the failure is now reported, and the run settled, once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes I reviewed the failed-opening settlement fix added since the prior Pullfrog review.
- Deduplicated failed opening settlement — Recorded each shared opening rejection once so multiple running notices cannot report the same paused or interrupted run more than once.
- Covered the rejected-opening race — Extended the post-state-read pause test with a second running notice and asserted exactly one settlement callback.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏
…/sambitcreate/aiden-agent into claude/project-thread-awyxuf-pr5
…/sambitcreate/aiden-agent into claude/project-thread-awyxuf-pr5
|
Linux E2E (2/3) on 79ba58e failed before any test ran. Generated by Claude Code |
…/sambitcreate/aiden-agent into claude/project-thread-awyxuf-pr5
…/sambitcreate/aiden-agent into claude/project-thread-awyxuf-pr5
…/sambitcreate/aiden-agent into claude/project-thread-awyxuf-pr5
|
Desktop tests (renderer-other) on a887515 failed 1 CLI test: Generated by Claude Code |
…' into claude/project-thread-awyxuf-pr5
…hind one that wasn't running, and close the parity test's Bot sessions
…' into claude/project-thread-awyxuf-pr5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018VA6REg8PpdXdPfTkkCKZJ
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes I reviewed the failed-opening ordering follow-up and CLI parity teardown added since the prior Pullfrog review.
- Retained settlement authority: Replaced the handled-error set with per-opening state so a running notice that joins behind a non-running notice still performs the single settlement reread.
- Covered notice ordering: Added a deterministic rejected-opening test that verifies one error report and one settlement when idle and running notices share the attempt.
- Closed parity resources: Closed the Bot-session services created by both CLI parity signal probes during teardown.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes I reviewed the host-feed contract assertion added after the previous Pullfrog review.
- Verified summary signaling: Asserted that an
aiden serveBot row carriessummarized: true, independently covering the revision-66 signal paired Macs use before establishing unread baselines. - Synchronized the stacked base: Incorporated the latest base merge without changing this PR's production behavior.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using GPT Sol | 𝕏
…' into claude/project-thread-awyxuf-pr5
…' into claude/project-thread-awyxuf-pr5
…' into claude/project-thread-awyxuf-pr5

Requested by sbt · project thread
Stacked on #912 (→ #910 → #909 → #907 → #895). PR 5, the last one in the "Fix Bots shown across Macs" plan. Release once the whole stack merges.
Problem
The headless server (
aiden serve) runs durable Bots, but its host-feed Bot rows carried noneedsYou,failed,lastReplyAtorpreview. A paired desktop therefore showed its Bots with an empty line, no unread dot and no Needs you, and listed them in the Inbox only while open. It also couldn't offer PR 4'sbot:needs-youto phones.Change
createCliBotSignals(packages/cli/src/remote-bots.ts) builds the sameBotLiveProjectionthe desktop uses from the durable runtime (conversation,state,quietInputs) and the CLI approvals bridge (approvalPending). CLI Bots ask no questions and take no hand-offs, so an approval is the only wait.botSignals(through the desktop'shostFeedBotSignals), and the Remote routes getbotNeedsYou, so the router offersbot:needs-you(revision 68).Screenshots
No UI change in this PR: the server sends fields that PR 2's desktop rows and PR 4's phone rows already draw (screenshots in #907).
Scope
packages/cliwiring, CLI and API docs. No protocol change beyond what #907 and #912 define.Verification
packages/cli:npm run build,tsc --noEmit.tests/parity.test.mjs:preview: "Durable answer"and alastReplyAt. A waiting approval makesneedsYoutrue andbotNeedsYoulist the Bot. A pause reaches the feed listener.bot:needs-you, a device that negotiated it seesneedsYouon the waiting Bot, and an older device never sees the key.tests/inbox-host.test.mjsandtests/bundle.test.mjspass (12).tsc, eslint on the touched files, andnpm run test:ci-policy(123) all pass.AI disclosure
Written by Claude Code from the approved fix plan; verified by the tests above.
Checklist
packages/cli/README.md,docs/aiden-remote-api-v1.md(CLI host section, revision 68),docs/aiden-on-the-go-remote-access.md,.memory/bot-chat-activity.mdGenerated by Claude Code