Repository navigation
fix(onboarding): the install intro stops promising a listener that isn't there (W4 preventive) - #943
Merged
Merged
Conversation
…n't there Posted server-side the moment a seat is created, the intro always said "Mention me with @handle when you need me" — for a BYO seat that is before any wrapper process exists to answer. The promise is made in the agent's own voice, which is the most authoritative surface we have. Production message history shows what it costs. Four users took the invitation and got total silence: m0re 2026-08-04 "@m0re-agent 1" → silence l3r0ys4n3 2026-08-07 "Hi", right after the intro → silence user-8863 2026-08-09 asked 3x, in two phrasings, whether the connection was working → silence ngoc-tran 2026-08-10 "@ngoc-tran-agent what modal you use" → silence None of the four came back. Across 21 real signups since 08-01, five ever typed anything and four of those five were these. The reply rate on genuine user mentions was zero. The intro now derives liveness from `deriveAgentState` — the same derivation the #891 honesty surface and the pod roster already use, so there is one source of truth rather than a second guess — and says what is true: not listening: "Nothing is running me yet, so mentioning me won't reach anyone. Whoever installed me can start me with `commonly agent run <name>` ..." listening: unchanged. Deriving rather than assuming matters: an already-running agent installed into a NEW pod is genuinely reachable, and telling that room nothing is listening would be the opposite lie. Derivation failure falls back to the old copy for the same reason. Composition moved into `composeInstallIntro` in registry/helpers, pure, so the copy rules are testable without a DB — the same reason agentStateService is pure. This is the preventive half of W4's stalled-connect work. #887 added honesty copy to the connect PAGE and never touched this sentence, which is the one users actually acted on. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
…edged copy ux-lead, fleet review 2026-08-14, reviewing #943. The first version took `listening: boolean`, which collapsed two different certainty classes. `never-connected` is structurally certain: no token has ever been used. `gone-dark` is INFERRED from staleness. Under the boolean a gone-dark agent announced "Nothing is running me yet" — flat-certain, and factually wrong, because it demonstrably ran. Asserting a guess in the agent's own voice is the same defect this PR exists to remove, wearing a different costume. So the state enum is now passed whole and there are three faces: never-connected flat declarative, it never ran gone-dark hedged — "I don't look connected right now — I was running earlier and have gone quiet, so a mention may not reach me" — instruction retained, because hedging the claim must not cost the reader the fix otherwise the invitation, unchanged Derivation failure now falls to 'unknown' rather than a boolean true, which lands on the same invitation branch and is an honest label for it. Two tests added: gone-dark must not say "nothing is running me yet" while still carrying the fix command, and unknown must keep the invitation. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
…staller's sprint-impl, fleet review 2026-08-14, reviewing #943. `deriveAgentState` unions `installation.runtimeTokens` with a USER's `agentRuntimeTokens` — and the user it means is the AGENT'S BOT ROW, because that is where a polling wrapper stamps `lastUsedAt`. The first version passed the human installer's tokens: a store no wrapper ever writes. Consequence: a reused, demonstrably live seat unioned two empty-ish stores, computed `never-connected`, and would have announced itself dead in a room where it was actively working. That is the same false-certainty defect this PR exists to remove, pointed the other way — and it was reachable, since install upserts by natural key and the route's own comment names reinstalling an existing identity as a supported case. Now matched the way the pod roster does it (routes/pods.ts:437): find the bot User by botMetadata agentName + instanceId and read its agentRuntimeTokens. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8
lilyshen0722
added a commit
that referenced
this pull request
Aug 14, 2026
…read 'unknown' (#945) Every self-serve BYO seat has been born mislabelled, and it is one mismatch. The connect page posts `runtimeType: 'webhook'` (V2AgentBYO.tsx:151) because ADR-006's self-serve branch requires that value to synthesize a manifest — while the user never runs a webhook. They run `commonly agent run`, which POLLS. No `host` was ever written, so `deriveAgentState` asks its three questions (push-webhook? native? byo?), gets no to all three, and answers `unknown`. Measured on production (pod-architect, fleet review 2026-08-14): **202 of 314 active installs derive `unknown`**, and every real BYO user seat is in that 202 — including all four users who mentioned a seat with nobody home and got total silence (m0re 08-04, l3r0ys4n3 08-07, user-8863 08-09, ngoc-tran 08-10). That one missing field is why the whole honesty layer is decoration: the #891 surface, the install intro (#943) and W4's stalled-connect trigger all read this derivation, so all three are inert for exactly the population they exist to protect. #943 would have merged, deployed, and changed nothing for the people it was written for. Discriminator: a PUSH webhook must supply `webhookUrl`, and no registry route writes that field — it only ever arrives in caller config. So webhook-typed WITHOUT a URL is a polling seat. An explicit host is never overwritten; the CLI attach path already sets it correctly. Includes the historical half as `scripts/backfill-byo-host-stamp.ts` (dry-run by default). Read-side normalization CANNOT substitute for it: I checked the casualty rows directly, and `normalizeRuntimeIdentity` only rescues the legacy `local-cli` + `wrappedCli` shape, which these carry neither of. There is nothing in them to infer from. Tests pin the predicate AND the consequence — the same seat reads `unknown` with no fixCommand before the stamp, and `never-connected` with `commonly agent run <name>` after. Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8 Co-authored-by: Claude Fable 5 <[email protected]>
lilyshen0722
added a commit
that referenced
this pull request
Aug 14, 2026
…Map (#947) Caught by live verification, not CI, and it made #943 a no-op on the exact path it was written for. `AgentInstallation` declares `config: { type: Map, of: Mixed }` (AgentRegistry.ts:235). On a LIVE Mongoose document `config.runtime` is therefore undefined — a Map needs `.get()`. `deriveAgentState` reads `config?.runtime` directly, so the install route handed it a document, it saw an empty runtime, answered `unknown`, and chose the cheerful invitation copy. The proof was two readers of one field disagreeing. After the host:'byo' stamp shipped, a seat minted through the REAL connect flow derived: /agent-states (uses .lean(), Maps become plain objects) → never-connected install route (holds the live document) → unknown posted intro: "Mention me with @stamp-verify-agent when you need me." Exactly the promise #943 exists to stop making, to a seat with nobody home. Every unit test passed throughout — they all pass plain objects, which is the shape `.lean()` gives and the shape this call site did not have. So the new suite pins the failure mode itself: the same input as a Map reads `unknown` with no fixCommand, and normalizing it first restores `never-connected`. Built field-by-field rather than spread, because spreading a Mongoose document copies internals instead of fields (they live under `_doc`) and would fail the same silent way. Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8 Co-authored-by: Claude Fable 5 <[email protected]>
lilyshen0722
added a commit
that referenced
this pull request
Aug 15, 2026
#956) `user-fbd3` signed up on 2026-08-15, installed a BYO agent 77 seconds later, never ran it, never typed a word, and left. The seat's install intro (#943) told them the truth at minute zero — "nothing is running me yet" — and then nothing ever followed up. That is the modal onboarding failure and it is the one the silence alert (#954) is blind to by construction, because it fires on someone speaking and these people never speak. Fifteen minutes after a runtime token is issued and still unused, the seat says so in the room where it was installed, addressed to the installer by name, and hands over the exact command. Built to ux-lead's spec, with three corrections from the fleet: - **The episode key is max(createdAt) across BOTH token stores** — the same union deriveAgentState uses for liveness. Key off one store while triggering off the union and a reissue on the other path never resets the episode, so "a reissue earns one more nudge" silently stops firing (pod-architect). Exported as one helper so the reactive responder does not recompute it (sprint-impl). - **The two token stores are not symmetric.** User.agentRuntimeTokens carries expiresAt; AgentInstallation.runtimeTokens does not (verified in both schemas). So a token episode ends differently depending on which store minted it. Recorded as `tokenSource` rather than left to be discovered. - **The confirmation is not time-bounded, and is compound** (ux-lead): flat for the past because a first-connection timestamp is a fact, derived at post time for the present because that is an inference. "Connected (first seen 09:00 UTC). It isn't running right now — restart it with ..." That also dissolves the case I thought was invisible: lastUsedAt leaving null is a permanent transition, so a wrapper that connects and stops between passes is still seen, it just gets a different present tense. The episode is claimed before the post, not after: a losing race then costs one nudge rather than delivering two, and a second message in someone's room cannot be taken back. i18n is deliberately deferred, with the seam left visible. The spec asked for en + zh-CN from day one; there is no mechanism — language lives in frontend localStorage, never reaches the backend, there is no User.language and no server-side i18n layer at all, and #943 shipped English-only for the same audience. ux-lead's ruling: ship en now, because the load-bearing content is the fixCommand and that is language-neutral, so an English nudge beats silence. The composers take a `locale` they currently ignore so the layer, when it lands, changes only them. Filed separately: persist the language SWITCHER choice as User.language — the choice the user made, not the browser's guess — which retro-covers #943 and the digest too. One derivation throughout: deriveAgentState decides connected-ness, the 15 minutes is only a patience window on top of its verdict. Claude-Session: https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8 Co-authored-by: Claude Opus 5 <[email protected]>
lilyshen0722
added a commit
that referenced
this pull request
Aug 21, 2026
…o BYO Sam, 2026-08-21: the config and install UI were built for the old moltbot system, and we support local + cloud now (pi next per ADR-021/023). Three cuts: 1. The gateway-mode and per-agent LLM-key dialog sections are deleted — moltbot-era fields rendered for every plain catalog install because the branch that skipped them keyed on the REMOVED presets flow. 2. claude-code Install navigates to the BYO connect flow instead of the dialog — a local wrapper is connected, not installed; the BYO page carries the token handoff and the connect honesty (#943/#945/#947). 3. Webhook's URL fields key on the agent, not presetContext — they had silently stopped rendering when the Presets tab retired. Also unwires the New Agent template creator (its rows no longer render, so a creator with invisible output is a trap). Native installs keep the plain name+pod dialog, which is the path that works.
lilyshen0722
added a commit
that referenced
this pull request
Aug 21, 2026
…o BYO (#1075) Sam, 2026-08-21: the config and install UI were built for the old moltbot system, and we support local + cloud now (pi next per ADR-021/023). Three cuts: 1. The gateway-mode and per-agent LLM-key dialog sections are deleted — moltbot-era fields rendered for every plain catalog install because the branch that skipped them keyed on the REMOVED presets flow. 2. claude-code Install navigates to the BYO connect flow instead of the dialog — a local wrapper is connected, not installed; the BYO page carries the token handoff and the connect honesty (#943/#945/#947). 3. Webhook's URL fields key on the agent, not presetContext — they had silently stopped rendering when the Presets tab retired. Also unwires the New Agent template creator (its rows no longer render, so a creator with invisible output is a trap). Native installs keep the plain name+pod dialog, which is the path that works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
W4's preventive half. The plan has the reactive trigger (respond after a mention stalls); nothing stopped us making the false promise in the first place.
The measured failure
The intro is posted server-side at seat creation and always said "Mention me with @handle when you need me." For a BYO seat that is before any wrapper exists. Four users took the invitation and got total silence:
@m0re-agent 1— testing if anything was aliveHi, right after the intro@ngoc-tran-agent what modal you useNone returned. Across 21 real signups since 08-01: 21 verified, 21 got a workspace, 5 ever typed anything, and 4 of those 5 are the rows above. Reply rate on genuine user mentions: zero.
This also corrects our own record. The consolidation plan's "Current truth" says "nobody's first mention has ever failed — users historically never got far enough." All four failures predate the plan.
The fix
Liveness now comes from
deriveAgentState— the same derivation the #891 honesty surface and the pod roster use, so there's one source of truth instead of a second guess:commonly agent run <name>on the machine where I should live — then @handle will get through."Why derive instead of assume a fresh seat is dead: an already-running agent installed into a new pod genuinely is reachable, and telling that room otherwise would be the opposite lie. Derivation failure falls back to the old copy for the same reason.
The copy instruction names the installer, not the reader — most people seeing it in a shared pod can't run the command. Same split
agentStateServicealready makes betweenstate(everyone) andfixCommand(owner only).Structure
Composition moved to
composeInstallIntroinregistry/helpers, kept pure, so the copy rules are testable without a DB — the same reasonagentStateServiceis pure. Six tests, including the inverse case (a live seat must still invite the mention).Note on local test runs
registry.install-runtime-type.test.jsfails to even load on my machine —jsonwebtoken→buffer-equal-constant-timereadsSlowBuffer, removed in Node 26. It breaks oninstall.ts:5, untouched here, and hits any backend test importingmiddleware/auth. Environmental; CI is the control. Worth knowing now that the backend has moved to Node 22 LTS.Not included
The reactive responder (answer a mention that lands on a dead seat) — W4 item 3. That's the recovery path for seats installed before this fix, and it's the natural follow-up.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XeUH4HVDsDHYPsHJthXjB8