Repository navigation
Chat Stream and Tools
-
A run footer describes the run, but its actions act on the TURN.
RunFootergets the run's owner row (its last real AI message) for model/usage/duration, andresolveRunFootersnow also carries the run's own boundary:runStartIndex/runUserId(the user row that opened it,-1/''for a transcript that starts mid-run) andanswerText(every non-notice row between them, joined). An omp run spans thinking → tool calls → answer, so the owner row is almost never the row a user turn sits in front of. Measured on 498 real sessions (1453 footers): Retry fired on 19.7% of footers before and 99.2% after, and the copy payload differs from the owner row's own text on 48.4% of runs (127 runs where the old copy produced nothing at all). -
Retry re-runs the run's opening user row, and rewinds the JSONL first. The old lookup required the owner's immediate predecessor to be a user turn and returned the list unchanged otherwise — a silent no-op that still aborted the live run, so clicking mid-stream stopped the answer and did nothing else. A real omp session now posts
POST /api/chat/:id/rewindfor that user row before re-sending: dropping only the client's rows left the abandoned turn on disk, and the next reload brought the "retried" answer back beside its replacement. The row-before-the-owner fallback survives for a caller that still hands over an AI row id. Both omp transports share that file:harnessSupportsRewind(shared/lib/harness/rewind.ts) allowsomp-rpcandomp-acp, and the endpoint tears a live ACP child down BEFORE truncating (it holds the old context and is the only other writer); the next prompt resumes the truncated file over RPC. Another ACP agent is refused in words before its child is touched — it keeps its history in its own store and ACP has no truncation. -
Undo and Retry live together in
src/client/hooks/chat/timeline/rewind-actions.tsbecause they share those rules plus one more: a refusal is reported.requestRewind(client/hooks/chat/timeline/rewind.ts) returns the server's own reason,reportActionError(wired to the chat's toast stack fromChatTimeline) surfaces it, and the Undo dialog keeps itself open with an inline line as well. Previously a 400 was a barefalsethat only stopped the modal from closing — indistinguishable from a slow request. -
A rewind cut point is a turn, not just a user message — and not always a record IN the file.
isRewindCutPoint(server/lib/omp/session/rewind-file.ts) acceptstype:"message"withmessage.role:"user"andtype:"custom_message"withcustomType:"skill-prompt"— omp expands/skill:<name>into a custom record and writes no user message for it, so the route's original role test refused every skill turn withentry_not_found. A builtin command (/usage,/compact,/context) goes further: it writes no entry at all, so its timeline row lives only in Kabmo overlay under a client-side id (msg-…-user). The client therefore sends that row's ownstartedAt, andtruncateSessionBodyplaces a cut the file cannot name at the first file turn at or after that clock (a clock past every turn cuts at the end).overlayCutClockis the requested row's clock in that case, not the file turn's, so undoing one/usagealso removes the next one; the overlay prune (pruneStoredAfterCut) drops rows at or after it, plus the file turns the cut removed. Verified over every user row of all 498 sessions: 1452 cuts, 0 refusals, 0 resurrections on reload, 0 earlier rows lost. -
A failed Undo leaves the draft alone. The composer text is restored only AFTER the rewind succeeds: restoring it first read as "undo worked" while the turn was still on screen, and had to be cleared by hand.
-
A failed Copy says so instead of doing nothing.
CopyButtondisables itself on an empty payload with a reason in its title/aria-label, because 8.1% of runs genuinely have no text anywhere (tool-only or aborted turns) and the oldif (!text) returnswallowed the click. The run footer passes its own "Nothing to copy — this run produced no text" wording. -
New-chat from a row carries the row's attachments, and seeds the draft as a QUOTATION.
onNewChat(content, attachments)seedsNewChatModal, so an image or inlined text file is not dropped from the branched chat. The draft itself goes throughseedNewChatDraft(shared/lib/chat/new-chat-seed.ts): the row's text, a blank line, then---, so the user types their instruction UNDER the quoted message instead of into the same paragraph. Two properties of that placement are load-bearing. The blank line before---is what keeps it a thematic break — a---directly under a line of text is a setext H2 underline, and the timeline renders every user turn as markdown, so the seeded message would come back as a heading. And the divider sits AFTER the seed, never before: omp parses a command token at the START of the prompt, so prefixing would turn a leading/usageinto prose and stop it running. Do not "harden" this by fencing the seed — a fence changes exactly one thing (a command stops being a command), while protecting nothing: nothing on Kabmo's side executes that text, and a@agentmention is rewritten bytranslateAgentMentionswhether or not it sits in a fence (measured: raw, fenced and----prefixed seeds all rewrite the mention). It would also turn the TUI-only names (/plan,/clear,/hotkeys) from a refused-and-reported turn into literal text the model improvises around, which is the failurecomposer/tui-only.tsexists to prevent. -
The New Chat modal maximizes, and its composer grows with a ceiling. A header button toggles the card between its default
42rem / 90vhand an expandedmin(96vw, 1600px) / 92vh, and the composer's textarea sizes itself to its content —useAutoGrow(hooks/chat/composer/auto-grow.ts) measuresscrollHeightand clamps it between 80px and a ceiling (320px, 480px expanded), scrolling past it. The chat composer grows too, but to a LINE count:CHAT_COMPOSER_MAX_LINES(7) is resolved against the textarea's ownline-heightplus its padding, because the same element renders at 13px everywhere except iOS, wherecomposer-typeforces 16px to stop Safari zooming the page — a px cap would be a different number of lines on each, and themax-h-40the phone composer used to carry cut the box at 160px, one and a half lines under the ceiling. Growth is measured only while the layout does NOT own the height: a stretched composer passesenabled: false, which clears the inline height (ah-fullphone box and amin-h-[38vh]desktop box keep their own sizes) and a compact one renders no textarea at all. Two failure modes are pinned here. The card's size is applied as an inline style, noth-[92vh]/max-w-[min(96vw,1600px)]— an arbitrary-value class only exists if the CSS generator emitted a rule for that exact string, and a missing rule fails silently (the toggle reportedaria-pressed="true"while the card kept its content height; measured in the browser, and the dev CSS bundle does not always regenerate). And the measurement resetsheighttoautofirst, becausescrollHeightreports the height the box would need AT its current size — without the reset the box never shrinks back after a deletion. -
The seeded bytes travel through
attachmentImage, which also reads adata:…;base64,preview — the load path never setsdataBase64, so a replayed image had no payload and was silently omitted from a retry or a seeded chat.attachmentHasPayloadis the one predicate the composer's send guard uses, so a replayed image is not mistaken for an unreadable one. -
Side effects that must happen EXACTLY once never sit inside a
setLocalMessagesupdater. Undo/Retry compute the truncated list fromlocalMessagesRefand persist outside it; the updaters that still callpersistMessagesare full-array overwrites of the same row, which re-applying cannot double (noted at each site).submitNewChat'sany[]becameAttachment[], and committed rows are normalized throughtoAttachmentListrather than cast. -
The pending "new-…" view offers the same actions as the real timeline.
EmptyWorkspacePromptrenders the same rows, soChatTimelinepassesonUndo/onRetry/onNewChatinto it; without them the optimistic turn's footer and its user bubble drew buttons that did nothing until the omp session was adopted. -
A FORK shows the conversation it continues, before AND after its first send. Two halves, one slice (
shared/lib/chat/timeline/fork-preview.ts→forkPreviewMessages, mirroring the server'scutIndexFor: a user anchor branches BEFORE that turn, any other anchor AFTER its turn, no anchor is the tip). While composing,useForkPreview(hooks/chat/timeline/fork-preview.ts) reads/api/chat/:source?limit=allandPendingTranscriptdraws those rows read-only above the optimistic turn — no Undo/Fork/New-chat (they belong to the SOURCE chat) and no run footer (the model stamp would be the fork's, and it has not run). The docked branch keeps the "Fork from" picker above the transcript for exactly this reason: switching the source swaps the rows, and its rows are keyed by source id so the previous source's transcript disappears the instant the picker moves. After the send,dispatchPendingChatprepends the same slice at adoption, because the timeline cannot read it by itself — a committed fetch is skipped while a run this page dispatched owns the rows, and a cleanly finished run never re-reads the transcript. Measured before the fix: the first forked turn rendered alone and the inherited history reappeared only after a reload; measured after, in the browser on a 2-turn source, the adopted fork's timeline held8027fe88(the source's turn) plus the new turn, with no duplicate ids. A per-message fork needs a transcript Kabmo can read — or an agent that takes a fork point.harnessHasLocalTranscript(shared/lib/harness/transcript.ts;harnessSupportsRewinddelegates to it) is that fact:omp-rpc/omp-acpwrite the JSONL, every other ACP agent keeps its own store and itssession/forkcopies the WHOLE history with no anchor.claudeandcodexare the exceptions: their JetBrains-maintained adapters read_meta.jetbrains.air.fork = {version: 1, messageId}and keep the history up to that message (claude-agent-acp at an assistant message, codex-acp at the turn that holds it; gate none; claude's resolver only groups ASSISTANT entries, so a user row has no fork point).forkAnchorFor(shared/lib/chat/timeline/fork-anchor.ts) therefore keeps the anchor for omp on any row and for an AIR adapter on an assistant row only; the server sends the_metafor those two and refuses an anchored request on every other ACP harness withanchor_unsupported— before this, the button silently forked the tip, handing back turns the user did not point at. An anchor id the file does not carry (a builtin command's row, stored by Kabmo only) is stillanchor_not_found, and the message now says so. -
The New Chat dialog's first send is PARKED and fired by the render that carries its pending id — never dispatched from the handler that opened the dialog.
useNewChatSubmit(hooks/chat/timeline/new-chat.ts) writesnew-…into the URL, parks{ pendingId, text, attachments }and lets an effect call the send path oncesessionId === pendingId. The previous shape (setTimeout(() => executeSend(...), 0)insidesubmitNewChat) captured the render the dialog was opened in, so the FIRST prompt left against the session the dialog was opened FROM — for an omp session it landed in the previous chat, no spawn ever happened, no sidebar spinner was armed (the run had no server row at all), and the new chat showed an optimistic bubble with no stream until the operator typed a second prompt, which worked because the composer's own handler reads the pending scope. The same call carries the workspace: the pending session gets afolderId(the current session's owning folder, else the composer's pick, never overwriting one already in the URL), because the first send SPAWNS in that folder's cwd and a dialog opened from a session picked in the sidebar had nofolderIdat all — the send would have fallen back to the simulated stream. Verified in the browser against an isolated MOCK instance: the send navigated to?sessionId=new-…&folderId=3, issued no POST to the session the dialog was opened from, and rendered exactly one user bubble;new-chat.test.tsfails with the old dispatch restored. The parked record also carries the SOURCE chat's harness (useNewChatOpencapturesactiveHarness.harnessat open time;executeSendpasses it ascomposerOptions.harness) — the dialog has no harness picker, so without it a New Chat opened from an ACP answer silently spawned on omp's RPC default and the new chat was a different agent from the answer it was started from.new-chat-open.test.tspins the capture (and its clearing on close), and the submit test pins the option on the first send.
-
One "a run is in flight" state serves the whole timeline:
timelineRunning = isChatRunning(streamStatusMap, sessionId, ownRun)(ChatTimeline,hooks/chat/timeline/index.ts).streamStatusMapis the provider'ssessionId → streamStatusmap built from thesidebar:statustopic (hooks/chat/omp/session-list.tsx), andisSessionStreaming(hooks/chat/omp/session-statuses.ts) is the exactstreamStatus === 'stream'test the session item'sLoader2spinner is drawn from. The docked indicator, the streaming row's marker and the withheld run footer all readtimelineRunning, so they cannot disagree with the sidebar, and a run this page did not start — a second tab, a second Kabmo instance (the status row lives in the shared database and the child belongs to whichever process owns it), a scheduled task, a page that never attached to the stream becauseGET /api/agent/:idanswersrunning: falsefor a wrapper this process does not hold — is still reported. The server row cannot cover two windows, and BOTH must be reported or a run reads as already settled while it is still starting. (1) A pendingnew-…chat has no omp id until the spawn answers, so no row can ever carry it. (2) A run THIS PAGE dispatched, in the beat between the send arming the optimistic rows and thestreamrow reaching this client over the topic — measured at ~120-250 ms, and the reason the run footer "appeared for an instant" on every prompt: with the row alone,resolveRunFooterswas handedisGenerating: falsefor that window, settled the run, and painted a model/duration footer over the EMPTY placeholder row, then withdrew it the moment the row arrived. The second term isownRun— the render-visible mirror ofownRunRef, armed by the send path alone (setGenerating(true, true)) and released by the same settle paths as the run — NOT the raw local flag: an ADOPTED run (the mount probe resuming a live run's UI) leaves it alone, so a run this page did not start is still reported by the server row and never by client state. The per-frame browser proof of that window (chat.e2e.ts) was removed: it sampled the DOM every animation frame and flaked on three runs, so it reported timing rather than the footer. A THIRD source must not exist, and it is what this used to have.stream-pendingwas a client-side mark armed by the send path and released byonAgentEnd/onPromptSettled, and its release depended on the client naming the session id it had armed: a mark armed for a pendingnew-…id and released under the adopted omp uuid was never released at all, and a mark re-armed byonResumeStreamoutlived the run it described. It forcedstreaminto the sidebar'sfolders, soisSessionStreamingread it too and BOTH surfaces kept spinning over a finished turn — the reported "spinner and generating indicator run again after the stream has finished". The whole mechanism is gone (stream-overlay.ts→sidebar-overlay.ts, which now holds only the seen-strip and the title hint). The composer's ownisGeneratingprop stays the flag for Send-vs-queue and the model/thinking picks deferred to the next prompt — those belong to the run this client is driving — but Stop followstimelineRunning, because a run this page did not start (a second tab on the same session, a scheduled task, the goal driver's continuation, a reload that never re-attached) is still a run, the sidebar's spinner says so, and hiding Stop for it left the only control that ends a turn unavailable with nothing on screen to explain why. The press stays honest about ownership:POST /api/agent/:idanswers a stop for a session this process does not hold withsession_not_running(409) instead of falling through to the spawn path (LIVE_RUN_COMMANDS,rpc/constants.ts), which would resume the session FILE — a second writer on a file the owning instance is streaming — answerabortagainst the child it had just created, and then, on theforce_resetescalation, destroy that same child. A run streaming on another instance therefore shows the rotatingCOOL_VERBSfallback: no frame ever named its activity here. -
A run omp no longer owns is settled by Kabmo, on omp's own quiescence verdict (
src/server/lib/omp/rpc/run-settle.server.ts). Astreamrow is released by a terminalagent_end, and two shapes never send one: omp ends the turn withagent_end {isTerminal:false}(a detached subagent, a background job, a queued continuation) and the continuation never arrives, or the frame stream stops for any other reason.streamingthen stays true for the life of the process, and nothing reaches the row: its owner is THIS process and it is alive, so the sidebar heal's staleness half sees a live pid and its orphan half only releases rows whose run this process does NOT hold; andGET /api/agent/:idanswers a busy session from local flags precisely so aget_statecannot queue behind the running turn, so the one reconciler is never called. Measured on a real stranded child: the row survived 90s of sidebar loads and the attach probe answeredbusy:truethroughout, while the transcript was complete — the reported "finished session spins forever". The repair is a probe ofget_state.isSettled(omp's own "nothing live, admitted, scheduled, queued or awaiting background work"), and it is the ONLY thing allowed to settle: anything short oftruetouches no flag, so a mid-run probe can never blank a live run. The clock (RunSettle) is fed by every frame, fires afterRUN_SILENCE_MS(30s) of quiet, and an announced retry wait (auto_retry_start'sdelayMs) pushes the deadline out by the wait omp promised. On a settle it reconciles the flags throughbuildWebState, writesfinishand emits the terminalagent_end— without that frame the clients keepisGeneratingand the withheld run footer armed (verified end to end: rowstream→finishat t+32s with no restart, and in the browser the indicator was replaced by the settled run footer). It is armed from the module (loadSidebarDataasks each live wrapper, fire-and-forget, so the list never waits on a probe) and awaited from the attach probe, which is where the user's own click lands. -
A provider retry is NAMED, because the run legitimately stays open across it. omp replays transient provider errors by itself (
retry.enabled,retry.maxRetries, honoring the provider'sretry-after) and each retry announces itself withauto_retry_startand opens a freshagent_start— noagent_endin between, so the sidebar spinner and the indicator were correct while the timeline said nothing about why nothing moved (measured: 2m43s on a real quota wall, last visible row an error).shared/lib/chat/timeline/provider-retry.tsfolds those frames: the indicator readsRetrying after a provider error 2/3 · next in 7s, and the FIRST attempt of a saga (attempt === 1) leaves one persisted notice row so a reloaded chat still records it. The phrase is sticky for the saga's duration (providerRetryVerbRef, consulted bysetActivity) because otherwise the attempt's own frames name a phase —turn_start/agent_startsay "Thinking…" over a request that is about to fail, which is the uninformative spinner this replaced. Two traps are pinned by tests: the saga's ownagent_startre-enters the loop andonAgentStartwrites the indicator directly (bypassing the mirror), so the override must publish even when the mirror already holds the phrase; and a terminalagent_endcloses the saga, since it can arrive with noauto_retry_endin front of it. Never settle a retrying run:get_state.isSettledisfalsethroughout one (verified against real omp), which is what lets the two mechanisms share one predicate. -
A committed history fetch never lands while a run THIS page started is live; the guard is keyed on
ownRunRef, never onisGeneratingRefand never on the AI placeholder.useSessionLoad(hooks/chat/timeline/session-load.ts) skips the/api/chat/:idpayload entirely — no replace, no merge, no emptying — while a run THIS page dispatched is streaming, because that payload is a LAGGING snapshot: for a fresh spawn omp may not have written the session file at all (its writes are buffered until the first assistant message settles) and it never carries a segment still streaming. Keying the guard on the AI placeholder instead (isGenerating && aiPlaceholderIdRef) re-opened it mid-run, because the stream releases the placeholder at the first assistantmessage_endwhile the run continues — and both failure shapes were measured on real sessions: an empty payload emptied the list (the just-sent turn vanished), and a payload carrying the file's own copy of that turn was merged UNDER the live rows, whose ids differ (msg-…-uservs the echoed id), so the turn rendered twice. Keying it onisGeneratingRefalone was worse and is the bug this fixes: the mount probe that RESUMES a live run's generating UI (useOmpAgent→onResumeStream) sets that flag too, so merely OPENING (or reloading) a session another writer was streaming discarded its whole transcript — measured on a real 333-message run: 0 rows on screen with only aLoad earlier messagesbutton, whose click paged a window into an empty head and so appeared to do nothing.ownRunRefis claimed by the send path alone (setGenerating(true, true)inhooks/chat/timeline/send.ts) and released bysetGenerating(false), so a run merely ADOPTED still loads its history and an empty payload still clears a non-pending session.session-load.test.tspins every direction (the own-run skip, the adopted-stream load, and the idle mount's load/clear). -
The docked indicator names the WAIT when the run's identity is not known yet, instead of drawing an empty one. A fresh spawn has no provider/model for its first seconds: a pending
new-…session has no sidebar row yet, sorunModelis null, and the resolved model only arrives with the spawn response (seedSession).GeneratingIndicatortherefore rendersLoading…when neither half resolves, rather than a bullet with nothing in front of it (• Thinking…, which is what the first prompt of a new session showed — measured in the browser:Loading...until the spawn answered, thenKenari · Deepseek-V4-1-Flash · Thinking…). One half is enough to name the run: a provider-only identity still says which account is answering. The rule lives in the SHARED component, so the chat dock, the empty-workspace view and the BTW panel cannot disagree about it. -
A LIVE
streamrow is preferred, never trusted blindly — and the row itself must carry the model. Reported as "the indicator still saysLoading…while the answer streams". Two independent gaps produced it. (1)runIdentityFor(hooks/chat/timeline/run-identity.ts) readliveRun ? runModel : (fallbackModel ?? runModel), so astreamrow with no pair discarded the session metadata that DID name the run; it now readsliveRun ? (runModel ?? fallbackModel) : (fallbackModel ?? runModel)— the row wins when it has an answer, the metadata answers when it does not. (2) The row could genuinely have no pair:agent_start/turn_start/message_start(server/lib/omp/rpc/frame-fold.ts) are the only writers for a run whose prompt never went through the dispatcher (a queue delivery, a scheduled prompt, a resumed child), and they wrote the status alone;syncRunModel(server/lib/omp/rpc/run-model.ts) then skipped its write whenever the wrapper already knew the unchanged pair. The fold now passeshost.runModelinto everymarkStreamStatus(…, 'stream', …)(the upsert's COALESCE keeps a pair a dispatch stored), and the probe writes on every run start —markStreamModelis a live-only UPDATE whoseIS NOTguard makes it a repair, and it raisesstream-statusonly when a row actually changed. The fold's host contract moved toframe-fold-contract.tsto keepframe-fold.tsunder the 350-line ceiling. -
The pending chat's dock IS the real timeline's dock, in one frame. A fresh spawn draws the generating indicator in
EmptyWorkspacePrompt(thenew-…branch) for the seconds before adoption, then swaps toComposerDock— the same row, built by two wrappers. They drifted: the pending branch kept the landing page'sp-8column and itsspace-y-3stack, while the real dock usedp-4 pt-1with its rows flush (the dock'sspace-y-2sat on a wrapper with a single child, so it was inert from the day it was written). Measured with the built CSS at 1200x1400: the indicator sat 141px above the pane's bottom while the spawn was in flight (Loading…) and 113px once the run streamed (Thinking…) — the row jumped 28px at the instant the identity resolved, which is exactly why the two states read as two different indicators. Both now renderComposerDockFrame(components/workspace/chat-timeline/ComposerDockFrame.tsx: padding,chat-column, phone safe-area inset, and therelativeanchor), the pending transcript reserves the real scroller'sp-4 pb-10box, and the landing page (no run to report) is the only branch that keeps the centred column. Re-measured after the fix: 113px / 113px, left edge 115px in both.composer-dock-frame.test.tsxpins that the indicator is inside the frame in both identity states and that the empty chat draws no frame. -
The run footer is withheld from the streaming row by POSITION, never by its role spelling.
resolveRunFootersskips the footer while generating whenownerIndex === streamingRowIndex(messages), and the guard must not also require the row's role to beai: that is only the LIVE mapper's spelling, whileroleFor(shared/lib/omp/session/messages-map.ts→messages-parse.ts) spells the rows a JSONL load produces for omp'sdeveloper,customandtoolResultentriesassistant— and a run reopened mid-flight has exactly such a row at its tail, the last entry written before the streaming answer. Gating onaisettled the footer on the row the answer was still streaming into, which is what "the AI footer already rendered while the stream was running" was.ownerIndexonly ever holds a non-user, non-notice row, so no role test is needed. Pinned byrun-footer.test.tsand a renderedMessageList.test.tsmount (both fail with the role test restored), plus thetimelineRunninggate above: a run this page did not start used to settle its footer too, for the same reason it hid the indicator. -
The generating indicator's mark is a spun nine-hue ring, and it is the ONE sanctioned chroma exception. It was replaced by a bare ink badge (
bg-ink+Bot) forDESIGN.md§3, and that replacement carried NO motion: the comment it shipped with promisedanimate-pulse, but the class was never applied, so a busy row was pixel-identical to a settled one and the only sign of life left was the ellipsis. The ring is back as.generating-mark-ring(src/client/tailwind.css), NOT as the inlineconic-gradientobject it started as: a component-level style block re-declared the keyframes on every render of every indicator the transcript holds, and a hex in a component is invisible to the theme tests. The spin is the shared.animate-spinwithanimation-duration: 1.2s, which the later reduced-motion block overrides to 3s (measured in the running app:spin 1.2snormally,spin 3sunderreducedMotion: reduce, dotsnoneat0.7opacity) — a stopped ring reads as a stuck indicator, a slowed one still reads as working.
-
The mounted row window SUBSCRIBES to the scroller NODE, and the node is state.
useTimelineRowWindow(hooks/chat/timeline/row-window.ts) attaches itsscrolllistener and its ResizeObserver in effects, so the effect must key on the element, never onscrollRef. The timeline paintsSessionSkeletonfirst and swaps the real body in a commit later, and a ref's identity never changes — so an effect keyed on the ref ran once, before the scroller existed, and never re-ran. Measured on a 240-message session at open:scrollTop9804 (the tail) with rows 0–10 mounted and a 9 374 px spacer BELOW them — a blank tail.useChatTimelineScrolltherefore returnsscrollNode(the element as state) besidescrollRef, andTimelineBodyuses itsscrollNodeRefcallback as theref. A rail click then wrotescrollTopinto that spacer, mounted nothing, and read as a dead control. -
Every programmatic landing writes
behavior: 'instant', because the container carriesscroll-smooth. CSSscroll-behaviorapplies to ascrollTopASSIGNMENT too (CSSOM-View: the setter scrolls withbehavior: auto, which resolves to the computed value), soel.scrollTop = targetstarted a smooth animation while the reveal's correction loop re-targeted it every frame — the jump was left wherever the loop stopped. Measured: the trace walked 9 804 → 6 504 px and stayed there.writeScrollTop(row-window.ts) is the one write path for the reveal and the reading-position restore. -
A reveal owns the viewport until it settles, and a second click supersedes the first.
revealRowreturns a promise that resolves on the still-frames test (or its deadline) and carries a generation counter, so two rail clicks land on the SECOND turn instead of racing.useRailJump(rail-jump.ts) holdsfollowRefoff for that whole promise, not for a frame count: a paging walk can sit still at the tail for longer than any fixed hold while a window is in flight, and the next prepend then re-pinned the bottom — measured as a jump to turn #60 of 120 ending atscrollTopmax. -
A rail tick names the id its row is mounted under NOW, not the one the committed index recorded. omp echoes the user turn LATE — after the assistant segment — while the committed
/turnsindex already carries omp's id for it. Until that echo reconciles, the composer's optimistic bubble is stillmsg-…-user, so the entry named a DOM id the timeline never rendered: the click paged nowhere and then sat outrevealRow's 3 s deadline, which is the reported "cannot jump to the message I just sent until I reload" (reload mounts the transcript's own ids, so it works).useUserTurnsmerges the pair as committed-index + mounted-row-id, and only for an entry NEWER than every committed turn still mounted — that bound is what keeps two prompts that happen to share their text from re-pointing the older tick at the new row. Evidence on this install: newest session01a1cd73…, stored overlay rowmsg-1794452424895-useragainst JSONL user row1bfa13dffor the same prompt. -
A jump waits for a window already in flight instead of being dropped.
jumpToTurn(session-pagination.ts) used to returnfalsewhileloadingOlderwas set, which is exactly the state a rail click arrives in when the reader is at the head of history — the click did nothing at all. It now awaits that request (bounded byPAGE_WAIT_MS) and re-checks whether the window already carries the target. -
The reading-position anchor stands down when something else moved the viewport.
row-window.tsrecordsscrollTopwith its anchor and skips the restore if the viewport has moved more than 1 px since — otherwise a rail jump landed and was then dragged back, and the reveal and the anchor restore ping-ponged the viewport between0and its target every frame (measured:scrollTowrites alternating 4 913 / 0 for the whole reveal). -
The composer's growth is a LAYOUT effect, and the timeline pins a CONTAINER resize inside the delivery.
useAutoGrowwrites the textarea's height before paint, so the ResizeObserver delivery for the shrunken scroller runs in the same frame;useTimelineGeometryPin(hooks/chat/timeline/scroll-geometry.ts) pins that delivery synchronously, while CONTENT growth stays deferred to the next frame (the loop fix). Written after paint, the growth was painted one frame before the pin that follows it — measured while typing: the composer grew 22 px, the scroller shrank 22, and the last row's bottom sat 22 px past the scroller's edge for a frame. AscrollTopwrite cannot resize the container, so the synchronous path cannot re-trigger its own observer. -
A jump re-aims with its OWN motion, and the open jump is INSTANT.
createJumpLanding.start(behavior)repeats the behavior it was given: aninstantjump re-aims in the same frame the tail moves, asmoothone keeps the stall counter so a continuation never reads as a second jump. The open jump is issued against an ESTIMATE that the first window's measurements invalidate within a frame, so the watch always re-aims — and re-aiming smoothly turned "open at the tail" into a ~700 ms animated scroll through the whole session, with the mounted window sliding and rows mounting/unmounting every frame (measured:scrollTop14 109 → 16 033 over 21 frames, mounted rows 16 → 19 → 7). The row window's correction is instant too, so it may write under an instant jump (jumpBehaviorRef) and lands the open in the commit that measured the rows; under a smooth jump it still stands down. Measured after: the open paints at the tail on its first frame, zero geometry changes. -
A bottom jump OWNS the viewport until it has LANDED, and the landing is geometry, never a timer.
createJumpLanding(hooks/chat/timeline/jump-landing.ts) re-readsscrollHeight/scrollTopevery frame and re-aims (smoothly) while the tail is out of reach;jumpActiveRefreleases on three still frames at the tail, with a 2 s deadline. Four things made the scroll-to-bottom button read as "sometimes dead, sometimes jumping in pieces", and each is a separate rule: (1) the guard used to be a 1 000 mssetTimeout, so a long session still measuring at that moment had its jump finished by the observer'sinstantpin instead of by the animation — a snap mid-flight; (2) any upwardscrollTopcancelled the jump, and a measurement replacing an estimate CLAMPSscrollTopup, so a layout clamp could kill a landing nobody had interrupted — only real input (wheel/touch/pointer/key,READER_INPUT_WINDOW_MS) may; (3) the content observer and the row window both wrote positions while the jump flew, andadoptrestored the OLD reading anchor over the landing, undoing it (a streaming probe measured a round ending 366 px short, the button still up); (4) a smoothscrollTois dropped when the rows it passes are replaced, and nothing re-aimed, so the viewport simply stopped where the animation died.useTimelineRowWindownow takesjumpActiveRef(writes no position while a jump lands) andjumpCountRef(a new count claimstailPinRef, so the landing is not corrected back). Verified in the browser, desktop 1440 and phone 390: one continuous landing from the head of a 400-pair session (frames0 → 635 → 11 624 → 14 491 → 16 693, distance 0) and 8/8 clicks landing at distance 0 during a live stream.
-
Every rendered table carries its own scroll container, because a table cannot be narrowed and the timeline scroller is
overflow-x-hidden.width: 100%on an auto-layout table is a FLOOR, not a ceiling — the used width ismax(100%, the sum of the columns' min-content widths)— so one long unbreakable token (a path, a 64-char digest, a URL) makes the table wider than the message box it sits in, and the scroller'soverflow-x-hiddenthen clipped its right columns with no way to reach them. Measured inside the real timeline at 1440: a 4-column table came out 1444px wide in a 776px scroller, its right edge 696px past the scroller's right edge — desktop and phone alike. Thetablerenderer insrc/shared/lib/markdown/marked.tsnow wraps the BASE renderer's own output in<div class="md-table-scroll">…</div>(delegating toRenderer.prototype.tablerather than rebuildingthead/tbody, so aligned cells and escaping stay marked's business), and.prose-content .md-table-scroll(src/client/tailwind.css) is that scroll container:overflow-x: autocarrying the block's vertical margin, with the table's ownmarginreset to 0 inside it — a scroll container is a BFC, so a child's margin cannot collapse out and would otherwise be drawn twice. The table'swidth: 100%is deliberately unchanged: a table that FITS keeps its full-width look (narrow table measured exactly the wrapper's width at both 1440 and 390), and only an over-wide one scrolls itself. -
The scope is every markdown surface, not just agent output — the same renderer serves the editor's file preview (
document) and the wiki reader (wikiScope), and a table inside a user's own bubble is bounded by the bubble'smax-w-[92%]clamp. Verified end to end in the browser, through the real pipeline (renderMarkdown→sanitizeHtml→ the rendered row), on an isolated MOCK server: at 390px the sent user row's wrapper measuredclientWidth 307 / scrollWidth 1218and a bubble-shaped probe built fromMessageItem's own classes285 / 1142, at 1440 the sent row's598 / 1053— and in every casescrollLeftreached the last column (911px of range on the phone, 455px on desktop) while the timeline scroller stayed atscrollWidth === clientWidthanddocument.documentElement.scrollWidthstayed at the viewport (390/1440). No bare.prose-content > tableremains in the timeline, so nothing is left to be clipped. Cells also gainedoverflow-wrap: break-word, so ordinary prose wraps before a table ever needs to scroll. -
src/shared/lib/markdown/table.test.tspins the wrapper per table — one wrapper per table (not one around a run of them), the table as its child, and — the load-bearing half — that it survivessanitizeHtmlwith its class intact, since a strippedclasswould restore the clipping silently. It covers agent output,allowHtmldocument previews and prose without a table. Note the harness trait its fixtures work around: happy-dom's sanitizer path unwraps the FIRST root element of a fragment (<div>x</div>→x; Chromium keeps it, verified with DOMPurify in a real browser), so fixtures lead with a paragraph the way a message does. -
The inline-code chip's fill is a SOLVED palette colour, never an alpha (
--theme-code-fill,CODE_FILL_PERCENTinshared/lib/theme/ink-scale.ts, emitted per palette bytheme/css.ts, consumed by.prose-content code.inline-codeintailwind.css). It used to becolor-mix(in srgb, var(--theme-ink) 8%, transparent)— an alpha composites with whatever is painted behind the chip, so any hover tint under it changed the code's colour mid-hover, and with it the contrast between the code and its own chip. Measured in the browser on a real session: the same/Applications/Obsidian.appchip read#e4e9edat rest and#dce2e5with the hover tint behind it; the solved fill reads#e0e5ebin both states, with the chip's interior byte-identical (only the rounded corners still show the surface they sit on, which is their job). At rest it is within 4/255 of the old blend. It also removes lightningcss'scolor-mixfallback for that rule, which wasbackground: var(--theme-ink)— a solid ink slab under ink text.
-
symbols2is not a language subset, and dropping it broke every ASCII box in a code block.src/shared/lib/markdown/fira-code-fonts.cssis a hand-trimmed replacement for@fontsource/fira-code/{400,500,600,700}.cssthat kept only thelatinsubset on the reasoning that "this console is English-only".symbols2is the ONLY subset carrying U+2500-259F (box drawing) and U+2000-200A (the fixed-width spaces), so─ │ ┌ ┐ └ ┘ ├ ┤had no Fira Code face and fell through to the next family in the stack,monospace— a system face whose advance is not 0.6 em. Measured in WebKit at 12px on the running app:M7.2px,─/│/┌/├8.502px, so a─border overshoots its own│corner by 1.3px per column and an agent's ASCII diagram arrives visibly skewed (the reported "ascii render di markdown tidak lurus"). With the foursymbols2faces declared, all of them measure 7.2px and a 42-column box renders every one of its 12 lines at exactly 302.4px — verified through the real.prose-content .code-blockCSS on the production build, where the last character of every line starts at the same x. The faces carry upstream'sunicode-range, so the 3.5 kB files are only fetched by a page that actually lays out a box-drawing glyph.font-css.server.test.ts› "it declares the box-drawing subset" pins the four faces and the range. -
The
unicode-rangeon thelatinfaces is upstream's too, and it is what makes the face choice explicit. Without it the latin face claims U+0-10FFFF and the box-drawing glyph resolves by "last declared wins" for the U+2000-200A overlap; with it each face states exactly what it covers. Neither form changes a glyph the latin subset actually contains. -
Decorative symbols are still off-grid, and that is not fixable by a subset.
◇ ◆ ▣ ▤ ○ ● ⌕ ⚙ ☁ ✦ ⌘are in no Fira Code subset at all, so they resolve through the system fallback. They do not break a box's borders (measured: every line of a 42-column box still ends at the same x), but a diagram that pads a line with them instead of spaces will not line up.
-
A tool call is drawn by one of five styles, chosen in Settings → Chats → Tool Calls (
toolRenderStylein thekabmo_settingsblob; defaultcard, the style Kabmo shipped before the setting existed). The modes arecard(bordered accordion),compact(one status line, facts inline),trace(vertical rail per section),minimal(a faint line read as part of the answer) andtui(omp's own terminal frame: a rounded box whose head is one status line and whose foot carries the quiet facts). The names and the copy live inshared/lib/chat/timeline/tool-render-mode.ts; the renderers live intool-renderers/styles/, one file each, andToolCallingSectionmaps mode → component with a totalRecord, so a mode added without a renderer is a build error rather than a silent fallback. -
What a call SAYS is derived once, in
useToolView(tool-renderers/shared/tool-view.ts): the header, the subtitle, the facts, the plugin panel, the fallback Input/Diff/Output. Four styles each deriving their own would be four copies of one fact — the way a card and a rail start disagreeing about what a call did. What a call SHOWS when opened is likewise one component,ToolBody, shared by every style. -
Every style keeps the same expand contract.
toolToggleLabel(tool-renderers/shared/toggle-label.ts) is the one wording:Expand <Title> — <subject>/Collapse ….chat.e2e.tscollects the transcript's tool rows by[aria-label^="Expand "], andmobile.e2e.ts/tool-diff-scroll.e2e.tsclick/^Expand Bash/and/^Expand Edit/; a style that invented its own wording would read as a card with no title, and the specs would pass while the accessibility tree lost the subject.styles.test.tsxmounts every style through the real section and pins the label, the intent heading, the open/close cycle and the failed-call marker;styles/Tui.test.tsxadds the terminal frame's own facts — the border takes the call state, the head ends in a bracketed outcome word, facts are·-joined text, and a diff keeps+Ngreen and−Nred inside one statement. -
A transcript block's open state is SESSION state, because the row it lives in can be unmounted at any moment. The timeline mounts a WINDOW of rows, and an expand is itself a window event: the block grows its row, the next measurement corrects the scroll, and the row can leave the window and come back. A block that kept its openness in a local
useStatecame back closed — measured in the browser on a real session, one click on a thinking accordion removed and re-added every row at the window's edge (3 rows per expand on a 14-row session), and whether the block survived depended on how much content sat below it, which is why it read as "sometimes it works". Both halves are now stated once each:useToolOpenState(chat.toolOpen) anduseThinkingOpenState(chat.thinkingOpen,client/hooks/chat/timeline/thinking-open.ts) persist the reader's own choice per session and per block id, and only a choice is written — a generating run still opens itself, and that default is never persisted, so a reloaded transcript does not carry a row per thought.ThinkingSection.test.tsxpins it through the rendered control: a click, a full unmount/remount of the row, and the block still open — plus a mid-run close that must stick. -
A thinking block opens for the whole LIVE RUN, not only while its own segment streams. A warm session (the second prompt, a continuation after a tool call) delivers a thinking segment's first
message_updateand itsmessage_endinside one animation frame; the coalescer flushes the update and the terminal frame in the same tick, so the block mounts already finalized withthinking.isGenerating === falseand the old default (defaultOpen || isGenerating) left it collapsed for the rest of the run — the reported "thinking sometimes does not open".MessageListnow computes the live run as every row after the last user turn (lastUserIdx) and passesisLiveRundown;ThinkingSectionfeedsisGenerating || isRunStreamingtouseThinkingOpenState'sautoOpen, while the pulsing dot and the body's tail-follow still read the segment's own flag. A historical block before the last user turn stays closed, and a reader's explicit close still wins (choice ?? local). Pinned byThinkingSection.test.tsx(a finalized segment in a live run opens, in a settled run stays closed, 50 coalesced mounts all open) andMessageList.test.ts(the live-run boundary). -
A measurement corrects the scroll in the SAME commit, and a reveal owns the viewport while it flies.
useTimelineRowWindowused to capture an anchor and write it back from a second effect; that restore ran with the PRE-measurement layout, consumed the anchor, and leftscrollTopstate stale for the next commit, so the mounted range stepped back a row and then forward again. The correction is written insideadoptagainst the freshly laid-out rows (and intoscrollTopstate in the same commit, so the window describes the frame the reader is looking at). The other half of the rule: a runningrevealRowre-writes its target every frame, soadoptadopts the measurement but does not touch the position whilerevealingRefis set — without that guard the two traded the viewport (measured before it existed:scrollToalternating0and its target for a whole animation).row-window-reveal.tsholds the reveal loop;row-window.test.tspins that a row growing above the viewport keeps both the mounted window and the reader's row. -
A measurement ABOVE the viewport keeps the ANCHOR, never the tail. The row window measures its overscan rows, and a measured height differs from the estimate (e.g. 350 px vs 320). Following the tail for that growth moved the viewport by the difference: measured on the demo session while a thinking block streamed,
scrollTop12 039 → 12 009 → 12 044 → 12 014 withscrollHeightfollowing — the reported "scroll down, balik, scroll down, balik".measure()now reports whether the changed rows sat at or above the viewport top (rect.bottom <= 0);adopt()keeps the reading anchor and setsskipTailPinRef, anduseTimelineGeometryPin(scroll-geometry.ts) skips one delivery for it. The content above the reader stays put and the new content grows at the bottom; the smoke probe read one up-move (the send jump) and a monotonic tail afterwards.row-window.test.tspins the anchor and the skip flag. -
A collapsed row still states the outcome. The card spells it as a badge (
Done/Failed/Running/Skipped/Aborted); the line styles use a glyph plus ansr-onlyword, becauseabortedandskippedare distinct outcomes omp records and a bare check mark would tell the reader the model declined when the user had interrupted. A failed call takes--theme-error; a success stays in ink, so a run of ten calls does not read as ten warnings. -
The
tracerail belongs to the RUN, not to a block and not to a row. The first shape drew a segment per block, sized to that block. Measured in the browser on the 39-call sample session that produced three disconnected lines: thinking-1390 → -1356(34px), a 256px gap across the answer text, the tool section-1100 → 368(1468px), a 99px gap, then the notice467 → 512(45px). A line whose only job is "these steps are one sequence" cannot break at every piece of prose.MessageListtherefore groups consecutive non-user rows into ONErelativecontainer (data-trace-group) that draws a singleTurnRail; a user row closes the group, so a second turn gets its own line. Verified after the fix: 1 rail, 41 of 41 nodes inside it, every node at x=315 and the rail at x=315, desktop and phone (x=20on the 390px layout). -
Each block places only its NODE, and the node sits at
left-0with no translate. The 1px rail is atgutter + 3.5px(12pxtranscriptGutteron desktop, 0 on a phone), so an 8px node at the block's ownleft-0is centred on it. A-translate-x-[3.5px]on the node put it 3.5px left of its own rail — a real defect found by measuring, not by reading classes. The run footer is deliberately OUTSIDE the rail container: left inside, the line ran 58px past the last node (a model/duration stamp is not a step). -
The rail must sit in a column NO content occupies, and non-block content has to reserve it. The first shape put the rail at
left-[15.5px]of the run while the answer's prose starts atpx-3(12px), so the line ran 4px inside the first character: measured at 1440, the rail's own box was315–316and the<p>/<ul>of the answer measured311–979. A trace BLOCK reserves the column itself (mx-3gutter +pl-4), which is why its node and text never collided; prose, the standalone intent, the error strip, the diagnostic note and the summary card reserved nothing.traceInset(block-chrome.ts) is that fact stated once:ml-4(16px) for transparent prose — its text then starts at 28px, exactly where a block's own content sits — andml-5(20px) for a boxed element, which clears the node's 8px width so no fill or left border is crossed. A phone needs neither (rail at 3.5px, content already at 12px). Verified by walking every TEXT NODE inside the trace group withRange.getClientRectsand intersecting it with the rail's box: 0 text hits on desktop and 0 at 390px, while the only boxes still intersecting are the rail and its own nodes. -
A standard Tailwind utility can be MISSING from the served dev bundle, exactly like an arbitrary one.
ml-4was present in the production build (bun run build→.ml-4{margin-left:calc(var(--spacing)*4)}) and absent from the four/_dev-assets/asset/*.cssfiles the running dev server served, so the computedmargin-leftstayed0pxand the first measurement after the fix still showed the text at 311. Restarting the dev server regenerated the bundle and the inset applied. The lesson is the same as the mask: verify a layout class by MEASURING the computed style, and restart the dev server after adding a utility that was not previously used anywhere. -
The rail tapers at both ends via an INLINE style, not an arbitrary class. It spans the run, so it necessarily starts above the first node and ends below the last (21px / 32px measured — the row's margin plus the node's 9px offset).
[mask-image:…]was written first and measured asmask-image: nonein the browser: the class WAS in the built bundle but the dev asset serving the page had not been regenerated, which is the silent failure the arbitrary-value rule warns about. The mask is now an inlinemaskImage/WebkitMaskImage, which cannot miss. -
ThinkingSection's toggle keepsaria-expandedand NOaria-label.chat.e2e.tscollects[aria-label^="Expand "]and asserts every entry names a TOOL, so a thinking block spelling its control that way would be read as a tool card titled "Thinking". The tool rows keep the sharedtoolToggleLabel; the other blocks stay out of that namespace. -
The style covers EVERY transcript block, not just tool calls. Thinking (
ThinkingSection) and system notices — including task results and goal injections (SystemNotice) — were spelling the tool card's frame out themselves, so a user oncompactgot compact tool rows sandwiched between a thinking card and a notice card: a setting that half applied, which reads as broken. The frame, header row, icon, title, subtitle and body container now come from one table,blockChrome(shared/lib/chat/timeline/block-chrome.ts), andThinkingSection/SystemNoticeconsult it. Verified live in the browser on the 39-call sample session: switching card → compact → trace → minimal moved the thinking block's frame fromborder 1px / radius 12px, header 48pxtoborder 0 / radius 0, header 34px, with the transcript'srounded-xlcount dropping from 44 to the 2 that belong to the composer and an icon tile. -
ThinkingSection's toggle keepsaria-expandedand NOaria-label.chat.e2e.tscollects[aria-label^="Expand "]and asserts every entry names a TOOL, so a thinking block spelling its control that way would be read as a tool card titled "Thinking". The tool rows keep the sharedtoolToggleLabel; the other blocks stay out of that namespace. -
A one-line row clips its subject and facts in ONE row, like the card's meta line. The first shape put the subtitle and the facts as siblings of the title with
flex-wrap, and on a phone a long+43 −16chip pair widened the section: measured at 390 in the real timeline, the section'sscrollWidthran to 439 (compact) / 455 (trace) against a 362 client width, clipped by the timeline'soverflow-x-hidden— the same silent right-edge loss the markdown tables had. The subject and the facts now share amin-w-0 flex-1 overflow-hiddenrow, and the body carries the card's ownoverflow-hidden, so the inner panel (aNumberedCodeat415 / 327) scrolls itself and nothing widens the section. Verified at 390 for all four styles:section scrollWidth === clientWidth === 362,document.documentElement.scrollWidth === 390, zero rows over their own width. - Measured density at 1440 on the 39-call sample session: collapsed row height 63px (card) / 28 (compact) / 28 (trace) / 23 (minimal) / 22 (tui), and all five render the same 39 rows with the same intent headings.
-
A style is a frame, not a capability: the card's action facts and the generic body reach every style. Three facts were card-only, and each was a silent loss in the other four. A tool with no specialized panel (a custom or plugin tool) had no body at all, because the line styles gated the body on
hasPanelwhile the card always rendered the generic Input / Diff / Output;useToolView.hasGenericBodyis now the one flag, andToolBodyreads it instead of!hasBody. A result omp capped or rewrote had noFull outputchip, and a reminder envelope read as an ordinary success; both now come fromToolRowActions(tool-renderers/shared/ToolRowActions.tsx), which renders NOTHING when neither applies so the card's action gap and the line styles' row gap do not shift. The chip is a button, so the line styles render the actions as a SIBLING of the row's toggle button, never inside it. The trace node also gained itswarntone: an aborted call used to fall through to the muted node, indistinguishable from a running or skipped one. Verified in the browser at 390 on the 41-call sample (38 types + a spilled result + a panel-less custom tool): all five styles render 41 rows,scrollWidth === clientWidthon every row, and the artifact chip and reminder badge are present in each.styles/parity.test.tsxpins the three facts per style. -
tuiis omp's terminal transcript, ported as TEXT — no card (tool-renderers/styles/Tui.tsx). omp writes a call as a status line (✔ Bash: bun test [done] · 599ms), and the colour carries what a box would carry with borders, so the row has no border, no fill and no radius: measured in the browser on the 39-call sample session,border 0px / background rgba(0,0,0,0) / radius 0px, collapsed row 22px at 1440. The body, when opened, hangs off a hairline rule (border-l,ml-2 pl-3) the way a terminal prints output under its command. -
The head's three claims are three colours, and that is the load-bearing part. The outcome glyph and its
[word]take the state colour (--theme-successdone,--theme-errorfailed,--theme-inforunning,--theme-warningaborted/warned); the tool NAME takes--theme-info; the SUBJECT takes--theme-meta. Verified from computed styles in the live page underone-dark-pro-soft: titlergb(97,175,239)against subjectrgb(129,140,248)— a single ink tone for both is the reported defect, because the line then reads as one undifferentiated string.text-meta/85is NOT a class Tailwind generates (only.text-metais in the bundle), so the first shape silently fell back to ink and the subject matched the name; the utility used here is the plain one. -
The facts group clips as a UNIT. They ride the head after the outcome (
[done] · 140ms · 9 lines), capped at two with the full list in the group'stitle. Unbounded, they widened the section on a phone — measured at 390:scrollWidth 459 / clientWidth 362, with every head's fact span overflowing its own box. Withmin-w-0 shrink truncatethe section measures362/362and no row overflows, at 1440720/720. -
Expand/collapse and the intent heading are properties of the STYLE, not the card.
tuitoggles throughuseToolOpenStatelike the rest, its button carriestoolToggleLabel's wording (Expand Bash — git log --oneline -5 && git status --short),▸/▾is the affordance, and the per-call intent heading is drawn by the SECTION — sochat.e2e.ts's[aria-label^="Expand "]collection,mobile.e2e.ts's/^Expand Bash/click and the heading assertions hold unchanged. Verified live: 39 of 39 rows carrieddata-tool-row="tui", one opened row grew 22 → 330px with.code-surfacepresent, and the headingWaiting for the restart idempotency jobstill rendered on a session that has one. -
blockChromereadsframeto decide whether a block is framed, not the mode name.ThinkingSectionusedmode === 'card'; that is nowchrome.frame !== '', the table's own fact. It matters becausetuiis the SECOND frameless-by-design style (frame: '') whose header still has structure — mono type, the name in--theme-info, the subject in--theme-meta— so a thinking block or a notice undertuiis a coloured line over a hairline body rule, matching the tool rows beside it. -
The composer keeps its own card frame whatever the timeline style is.
expansion.test.tspins the composer's frame to the tool card's (rounded-xl,border-ink/10,bg-paper), which is correct while the transcript draws cards; the frameless styles do not change the composer, because the composer is the input the user is looking at, not a tool call. -
A style change applies live. The settings modal calls
applyToolRenderModewhen the value moves, which announcesomp:tool-render-changed;useToolRenderModeis the single subscriber. The initial value comes from the primed settings snapshot, so a mounted timeline draws the stored style on its first render rather than flashing the default.
-
The live omp agent bridge (
POST /api/agent/:sessionIdfor commands) streams events over WebSocket by default —GET /api/agent/:sessionId/ws— with SSE (/api/agent/:sessionId/events) as the fallback, selected in Settings → Chats → Streaming Transport (streamTransportinkabmo_settings; defaultwebsocket). -
Server side is one Elysia app for dev and prod:
src/server/index.tsowns the port and mountssrc/server/routes/, so the agent WebSocket (src/server/routes/agent/ws.ts) is a first-class.ws()route on that same listener. Started bybun run dev(watched) andbun run start/kabmo serve(production by default;--devruns the source entry). -
Client side:
src/shared/lib/chat/omp/{transport,socket,sse}.tsown the connections; both hand every frame tosrc/shared/lib/chat/omp/agent-events.ts, which folds it into Kabmo state. Keep frame handling in that folder — never fork behavior per transport. The two connectors are transport-generic (connectSocket/connectEventstake a URL); a session's BTW stream dials the same pair against/api/btw/:sessionId/*instead of adding a third flavour. -
A spawned child streams
message_updatein FULL mode, because delta mode drops the tool call's identity.configureChild(src/server/lib/omp/rpc/child-config.ts, called frommanager.tsinitialize) sendsset_event_filter {events:null, messageUpdates:"full"}, so each frame carries the whole accumulated message and the client folds it as-is."delta"was measured ~101× smaller on the wire (108 KB / 486 frames against 10.9 MB / 2217 on a 300-word prompt), but it drops the name and id a streaming tool call needs:toolcall_deltacarries ONLY{contentIndex, delta}andtoolcall_startcarries no block at all, so both live solely on themessage_startseed — which does NOT reliably contain the block. Measured on omp 18.10.3, the same model produced a seed of[text, toolCall]on one run and[thinking]on the next, so a card rendered a bare Tool for the whole argument stream and only snapped toWrite — <path>attoolcall_end, which also swapped the card id (tool-1→call_…) and remounted it, dropping the reader's expand state.fullmakes the name and id readable from the first delta; the terminal frames (message_start,message_end,turn_end,agent_end) carry the full message either way.delta-accumulator.tsandpartial-json.ts(the rebuild the delta projection required) are gone with it. -
The frames that are NOT about the conversation live in
transport-frames.ts.rpc_frame_error(omp dropped a frame that exceeded the transport limit — names the type, so the notice says which step is missing),extension_error(an extension threw; omp keeps the session alive, so this is the only place it surfaces) andsession_settled(the session went quiet — releases the optimistic generating state without waiting for the sidebar's next poll) are folded there, and so are the frames deliberately ignored (cache_warming_*,retry_fallback_*,config_warnings_changed,ttsr_triggered,todo_reminder,todo_auto_clear,irc_message) — listing them makes the omission a decision.agent-events.tsdelegates to it from itsdefault:branch. -
A topic's
attachis bound once per SUBSCRIPTION, so a replaced SOURCE needs an explicitrebind.hub.subscriberuns the descriptor'sattachwhen the first subscriber arrives and its cleanup when the last leaves — the topic is wired to whatever the source was at that moment. A session's omp child is routinely REPLACED while a tab stays subscribed: the idle reaper reclaims it after 10 quiet minutes (IDLE_REAP_MS), a composer access-mode change respawns it (reconcileSpawnApprovalMode), a crash destroys it, andforce_reset(Stop's escalation) tears it down. Without a rebind the topic keeps pointing at the DEAD child's fanout: the subscriber holds its subscription and receives the fresh snapshot (soonResumeStreamresumes the generating indicator) but no frames ever arrive — the answer looks like it never streamed until a reload re-subscribes and re-attaches. That is the reported "second prompt sometimes doesn't stream until I reload", and the spawn path is what fixes it:startRpcSession/startNewRpcSessionraise thesession-attachedsignal the moment the new child is reachable, andpublishSessionState(topics.server.ts) now callsgetRealtimeHub().rebind(topic)before itsrepublishSnapshot.rebinddrops the stale cleanup, re-runsattach, and is a no-op with no subscribers (a topic nobody watches must not hold a source open). Pinned byhub.server.test.ts(frames follow the replaced source; no subscribers → no attach) andtopics.server.test.ts(asession-attachedsignal detaches once, re-attaches, and re-snapshots the subscriber). -
Steering uses omp's
steer, neverabort_and_prompt. "Send Now (Steering)" on a queued row used to postabort_and_prompt, which CANCELS the running turn and starts a new one — the answer the user was watching was thrown away. Measured on omp 18.8.3 with a counting turn:steerproduced oneagent_start/agent_endpair with the model answering inside the same run,abort_and_promptproduced two of each.OmpAgentHandle.steerOmpRun(src/client/hooks/chat/omp/index.ts) postssteer, and because a steer creates no run boundary theinterruptPendingRefguard that existed to surviveabort_and_prompt's abort-then-restart is gone entirely. -
The run's tool bookkeeping survives an arrival that is the SAME conversation, and the STREAM is what proves it.
useOmpAgentclearstoolResultsRef/lastToolMessageRef/ the activity phrase when the session on screen is a different conversation, because they belong to one run: emptied mid-turn, every latertool_execution_update/tool_execution_endhas no target to pair onto and the card freezes atRunningfor the rest of the session (measured inwait.e2e.ts: the settle spec readWait Runningfor its whole 30s budget, and the browser trace showedrefresh … last nullbetween two progress frames of one call).isRunSwitch(client/hooks/chat/omp/run-switch.ts) is the rule, and three arrivals are NOT switches: a spawn adoption (new-…→ UUID, answered byisSpawnAdoptionwithout claiming the record the session-state provider owns), the same id again (a re-render, a metadata refresh), and a send that began with no?sessionId=at all — a chat opened from a workspace, where the URL carries only?folderId=. That third case is why the pending-id record is not enough on its own: no pending id ever existed, and the spawn path connects the stream BEFORE it writes the URL, soattachedSession() === sessionIdis the evidence. A session merely opened from the sidebar satisfies none of them — nothing dials it until the mount probe runs, which is after this decision — so it still clears and still probes for a live run. Pinned byrun-switch.test.ts. -
The channel never gives up, because a phone freezes the tab. A backgrounded Android tab (Brave/Chrome) stops running timers, and the server's 30s protocol heartbeat (
attachObserverStream,STREAM_HEARTBEAT_MS) tears the socket down because a frozen tab cannot answer a ping. Coming back, the client's backoff spent a 4-dial budget in ~7.5s — often before the radio woke from Doze — and then latchederror:scheduleReconnectreturned with no timer andconnectIfNeededrefused to dial fromerror, so nothing could ever recover and only a reload repaired the stream (the reported "indicator goes red and the stream stops until I reload"). Three rules replace that, all insrc/shared/lib/realtime/{connection,state}.ts(split so each file stays under the size ceiling:state.tsowns the socket slot, the status and the frame sink;connection.tsowns dial, backoff, the resume probe and teardown). The fast budget is a cadence, not a give-up — pastMAX_FAILED_DIALSthe channel keeps retrying atSLOW_RETRY_MS(30s), so a tab that never sees a resume event still repairs itself. A resume event resets the budget and dials at once —visibilitychange(only when!document.hidden),pageshow(a bfcache restore) andonline(the radio can return before the page is visible), installed once per state object so abun --hotre-evaluation cannot double them. A socket the browser still reports OPEN is PROBED, never trusted: a frozen tab never learns the server hung up, sowake()sends an application-level{t:'ping'}and waitsWAKE_PROBE_MS(2s) for the server'spong(notePong, called from the topic layer's already-decodedpongcase) — an unanswered probe closes that socket and the normal retry path takes over. Two guards are load-bearing and each was a bug first:socket.onclosereturns early whenhost.socket !== socket, or the abandoned socket's lateclosenulls the LIVE dial and schedules a third; anddial()returns when nothing is wanted, or a retry scheduled before the last subscriber left opens a socket nobody reads.RealtimeStatuslosterrorentirely — a state meaning "stopped trying" has no way back intoconnecting— so a dead channel readsclosed(red) while a retry is pending. And a phone's WebView delivers NONE of those events, which is why a WATCHDOG exists (resume.ts+watchdog.ts, split so each stays under the ceiling:watchdog.tsis the pure decision,resume.tsthe driver that owns the interval, the listeners and the probe). Measured on the shipped Android shell: a backgrounded WebView is never reported hidden, so returning to the app fires novisibilitychange, and a socket the server reaped while the page was frozen produces noclose—readyStatestill says OPEN. The channel therefore sat on a corpse withstatus === 'open', no frames, the answer frozen mid-sentence, and only a reload repaired it (the reported "websocket tidak terhubung, stream tidak lanjut, harus reload"). A running interval is the one signal a frozen page cannot fake, because a frozen page stops running it:LIVENESS_TICK_MS(5s) reads two clocks and askswatchdogAction— a tick arriving later thanFREEZE_DETECT_MSmeans the page was SUSPENDED (treated as a resume: reset the budget, probe or re-dial), and an OPEN socket silent pastIDLE_PROBE_AFTER_MS(25s, below the server's 30s reap so the question is asked BEFORE the reap) is probed even when nothing woke the page, which also catches a connection that died on a Wi-Fi→cellular handoff while the tab stayed visible. Freeze detection is gated on!document.hiddenbecause a hidden tab is legitimately throttled to about a tick a minute and every one of those would read as a freeze; the idle probe is NOT gated, so a connection that died while the user was in another app is repaired before they return. Two further guards, each a bug first: a probe armed before a freeze keeps its deadline timer frozen with it, soprobeIdstays set forever and every later probe returns early —probeArmedAtis what lets an arm that outlived its own deadline be discarded; and the interval is stopped with the last subscription and onresetConnection, or a released channel keeps probing nothing. The shell says so directly as well:window.__kabmoResume()(client/lib/native/resume.ts, installed inmain.tsxlike__kabmoBack) is evaluated fromMainActivity.onResume/ShellViewController.viewDidAppear, so the repair starts on that tick rather than at the next watchdog one — inert in a browser, and a no-op with nothing subscribed, which is why the shell may call it on every foreground. Pinned bywatchdog.test.ts(the decision table, no clock needed),watchdog-wiring.test.ts(the interval reaching the probe and re-dial paths, and the stale arm),connection.test.ts(backoff and the resume probe, driven through the publicsubscribepath),frozen-recovery.test.ts(a REAL server and a REAL socket: the reaped socket is abandoned, re-dialed and resubscribed with no event of any kind — A/B'd, it times out with the watchdog disabled) andnative/resume.test.ts(the property name both shells hardcode, and inertness when nothing is subscribed). -
A run whose terminal frames died with the socket is recovered from the TRANSCRIPT, not from a reload. A backgrounded tab (or a frozen phone) loses the channel, the turn finishes with nobody reading, and
message_end/agent_endgo into a socket that no longer exists — so the timeline keeps the stream's last PARTIAL segment and its local generating flag never releases, while the SERVER'sstreamrow settles normally (which is why the docked indicator stops but the answer stays cut off mid-sentence).client/hooks/chat/timeline/lost-run.ts(useLostRunRecovery→useReconnectSettleinclient/hooks/chat/omp/reconnect.ts) repairs it on the channel's own reopen: settle the local run (release the flag, clear the placeholder/optimistic/pending-steer ids, and dropthinking.isGeneratingso no accordion pulses over a finished answer), then re-read/api/chat/:id— unconditionally, because the rows on screen are the stream's snapshot and the JSONL is the only record of the rest, sosession-load.ts's own guard (which keeps a LAGGING read away from a live run) does not apply. Three conditions decide whether it acts, and each was a way to destroy a healthy turn. (1) The socket must have been OPEN and then gone: a dial is not a reconnect, so a send whoseconnect()opens a closed channel is excluded — that is the window where the optimistic turn exists but the prompt may not be on the wire. (2) There must be evidence a run was IN FLIGHT, and it is TWO independent facts (streamRunRef || serverRunRef): the stream announced it (set by every non-ownedsetGenerating(true)—agent_startand the mount probe's resume — never by the send path's owned arm), or the server wrote itsstreamrow at dispatch. The second is not redundant — a run whose very FIRST frame (agent_start) was the one lost has no stream-side mark on this client, and keying onstreamRunRefalone left that case unrecoverable (the timeline kept an empty placeholder while the answer streamed into a socket that was gone). A prompt that has not reached the server has no row, so the dispatch window stays excluded either way. (3) The server must say the run is over:runIsOver(client/hooks/chat/omp/run-liveness.ts) acceptsrunning:false, rejectsbusy(a live subagent, a parked dialog), a liveisStreaming/isPromptRunning, a non-zeroqueuedMessageCount(the session WILL wake again), and requires omp's own verdict to be literallyisSettled === true— the same rule the server'sRunSettleapplies (isSettled !== true→ do not settle), because a turn can be admitted but not yet streaming and two answers to "is this run over" is how the indicator and the transcript end up disagreeing; a build that does not report the field therefore settles nothing, and an unanswered probe is no verdict at all — settling a live run throws away the streaming answer, while missing a settle costs one more reconnect. An empty transcript read leaves the rows alone AND is retried onSESSION_META_RETRY_SCHEDULE_MS, for the same reasonrefreshSessionMetaretries: omp buffers its transcript writes, so the turn that just finished can be missing from the file for a beat after the channel returns — one read and stop would leave the partial answer in place, which is the state this recovery exists to clear. The retry is bounded and stops at the first non-empty answer, and the placeholder ROW is deliberately not deleted before the replacement arrives (only its mark is released), because dropping the only row first would blank the transcript for the retry window and for good if omp never flushed. Pinned bylost-run.test.ts(mounted through the realuseSessionLoad: the partial row is replaced by the committed turn and the flag releases; a live run, a first dial and an unanswered probe all leave it untouched),reconnect.test.ts(the trigger conditions and the once-only settle) andrun-liveness.test.ts(the verdict table);tests/e2e/specs/reconnect.e2e.tsis the assembled proof of the OUTCOME (a real child streams, the channel is held unreachable past the end of the run, and the full answer appears with no reload, one row, nothing spinning) — but it is NOT the discriminator for the mechanism: verified by disablinguseLostRunRecovery, the spec still passes, because the session-load effect re-running as the URL settles repairs the transcript in that shape too. The mechanism is pinned at the unit layer and each branch was A/B'd there.FAKE_OMP_PERSIST=1makes the scripted child write its turn to the session JSONL the way omp does; without it there is nothing to read back and the spec would pass for the wrong reason. Three failures shaped the trigger, and all three are now pinned by tests. (1) A run whose very FIRST frame was the one lost had no stream-side mark, so the trigger now accepts the SERVER'sstreamrow as independent evidence (streamRunRef || serverRunRef). (2) The client's generating flag FLICKERS false during a live run (aprompt_resultfolded as settled, the spawn-adoption window), so a drop landing in one of those beats was read as "nothing was running" — the evidence is now LATCHED (facts.sawRun), and a flicker cannot erase it. (3) The hook re-mounts while the CHANNEL does not — the effect is keyed on the session id, which moves mid-run when a spawn answers with omp's UUID — so local variables came back withwasOpen:falseand the following drop read as a dial that never opened; the facts live in a ref outside the effect andwasOpenis reconciled from the client's own status on every render.wasOpenis read fromrealtimeClient.status(), neversocket.readyState: the browser flips readyState to OPEN BEFORE dispatchingopen, and a spec gating on it fired inside theconnectingwindow (measured). -
Session auto-titling is ONE-SHOT per conversation, retried ONCE after the first run, and it runs on the SESSION's model (
src/server/lib/omp/session/auto-title.server.ts, fired from themessage_endandagent_endbranches ofsrc/server/lib/omp/rpc/frame-fold.ts; the request lifecycle issession/title-request.server.ts). omp force-setsPI_NO_TITLE=1under--mode rpc-ui, so Kabmo asks for the title itself by sending/renameto the child. The trigger is the first settled USER message, notagent_start— omp pushesagent_startbefore the turn opens, so the transcript is still empty there and a/renameat that point readsmessageCount: 0and is answered "Could not generate a session title" (measured on omp 18.3.0: the user message lands ~120ms afteragent_start).message_startis equally too early — omp appends the message to the agent's state onmessage_end, so only that frame makesget_statereport it.agent_endthen retries ONCE as the fallback, for the early attempt that came back empty (provider error, timeout, child gone, or the tiny model declining); it stands down when the name already landed. Never fire it beyond that: omp derives the title from the NEWEST turns andgenerateRenameTitlereserves a fresh title revision (cancelling any generation still in flight), so an attempt after turn two names the session after whatever the conversation had become by then. The eligibility latch isAgentSessionWrapper.autoTitlePending, seeded inapplyIdentityfrom omp's ownmessageCount(a--resumechild reports the messages it restored, so an existing session is ineligible from the start) and consumed by the settle attempt — the early attempt deliberately does NOT consume it, or a first-turn failure would leave the session unnamed for good.autoTitleRequested(reset at eachagent_start) keeps a queued steer message from re-asking inside the same run. The fallback ALWAYS dispatches, and the two dispatches are chained. It used to stand down while the early attempt's claim window was still armed, on the assumption that generation would land — measured on a real session it had already failed 52 s earlier, so the run ended with nothing asked again and the session keptNew Session - <timestamp>forever.sendTitleRequestqueues behind the dispatch in flight because omp cancels a superseded rename WITHOUT emitting the frame that would release its claim. And the request runs on the conversation's own model, which is what made it work at all. omp names a session with itstinyROLE and only appends the session's model whenretry.modelFallbackis on; measured here, six auto-title attempts across four fresh sessions all ran onkenari/deepseek-v4-flash(plan lapsed →429 plan_limit_reachedat ~52 s) and named nothing, while the two renames that succeeded — the manual action — ran onkenari-jatis/deepseek-v4-1-flashthroughwithTitleModelOverride. That pin is now written for BOTH paths and held until the request's frames arrive (omp resolves the role again for the card request after a successful title, so releasing on the ack produces an uncarded title); the overlay is newest-wins rather than queued, because a title model can take a minute and a second request must not wait on the first. Claims are COUNTED, not one slot (autoTitleClaims): with a single slot the second request overwrote the first, so the first one'scommand_outputreached the timeline as a notice row. A prompt sent after a run end waits for the dispatch (awaitTitleDispatchinsession-commands.ts'spromptbranch): both are separate frames on one stdin, and a prompt admitted first lets the rename name a conversation that has already moved on. The wait is the ack (~3 ms), bounded atTITLE_DISPATCH_BARRIER_MS, never the generation. A landed title republishes the sidebar (session_info_updatein the fold callspublishSidebarStructure): the title is rewritten in a fixed-width slot inside the session file, so the mtime the scan cache keys on does not move — measured, the list kept the placeholder while the header already showed the name, until an unrelated tool call republished. A first message omp's low-signal filter rejects ("hi") therefore leaves the session unnamed for good — the honest outcome, since the fallback does re-ask and omp declines a second time (the rejection is a property of the opening message, not of when it is asked). omp 18.9.0 added title CARDS and Kabmo carries them through rather than stripping them:title.icons(defaultnf+emoji) heads a generated or renamed title with an icon and a short code —formatCardTitleemits🧪 FLAKY: Fix flaky park tests— andsessionTitleForreturnssession.nameverbatim, so the sidebar renders exactly what omp's own TUI renders. No card-aware branch is needed (the prefix is part of the name omp persisted), and a user who wants plain names setstitle.icons: boring, a row the panel gained with the 18.9.2 schema. The card is also why/renamenow takes longer: a title with no card triggers a SECOND title-model request for the card (renameTitle→#cardIcons→generateTitle(named, cardPrompt)), which the 60 sTITLE_CLAIM_WINDOW_MShas room for. -
A
prompt_resultthat opened no turn is suppressed for as long as a run is in flight — dispatch included — and the RUN is the attribution, not the/renamerequest window.frame-fold.tsforwards that frame only when no run is in flight (promptRunning || streaming); the auto-title window (autoTitleWindowUntil) was not enough on its own, because it is armed around the/renameand omp answers that command within the same tick (measured ~3 ms on omp 18.7.0), so an ack that won the race reached the client anyway. The client folds this frame as "the run settled" (agent-events.ts→onPromptSettled), which blanks the docked indicator and drops the optimistic user mark — so the turn's own echo was appended beside the bubble it stood for, and Kabmo's copy of the conversation heldmsg-…-userand the echoed row side by side for one prompt (measured on real sessions; the indicator died ~450 ms into a 20 s run, and the turn rendered twice). The rule covers every auxiliary sender that answers on this frame — a Plan/Goal toggle,/reload-plugins,rename-with-ai, a peer instance's command — and the run's flags are left alone, exactly as the dispatcher leaves a non-owning command's (rpc/session-commands.ts). A builtin the operator typed while the agent is IDLE still passes through untouched: that is the case the frame exists for. The guard is the whole RUN, not its streaming half.streamingflips atagent_start, so the window between the prompt's DISPATCH and its first frame was open, and a background command answered there reached the client: measured on a fresh session (omp 18.22.2), the plan-reviewrepublishthe client fires on spawn adoption (usePlanReview,hooks/chat/timeline/plan-review.ts) reached the child 43 ms after the prompt and omp answered itagentInvoked:false160 ms BEFOREagent_start— the client settled the optimistic turn, the user echo appended a second bubble, and 57 of 58 first prompts rendered twice (49/50 with an 8 s pause before sending, 8/10 sent immediately; the pause is not the cause).promptRunningis set before the prompt is written and cleared only by a settle, sohandlePromptResultnow suppresses onpromptRunning || streaming; a prompt that genuinely opened no turn is still settled by the dispatcher's ownack.agentInvoked === falsebranch (rpc/session-commands.ts), which emits its own frame. Pinned byframe-fold.test.ts(dispatch window suppressed, idle builtin forwarded). -
A session whose RECORDED model no longer exists cannot be resumed at all — the spawn must name a model that resolves, or every command to it fails.
omp --resume <file>restores the model the session's lastmodel_changeentry names, and it does NOT fall back when that model has left the registry (a provider the user disconnected or removed frommodels.yml, a model added todisabledProviders): the child exits(1) witherror: Could not restore model <provider>/<id>before RPC comes up, so theset_modela model change posts, theget_statewarmup and thepromptall answer400 omp exited (code 1…). Reproduced deterministically on omp 18.13.1 with a copy of a real transcript whose last entry nameddeepseek/deepseek-flash(that provider is not in the registry at all) and confirmed for a disabled provider too (commandcode/claude-sonnet-5) — while the SAME file resumes fine once--model <a served model>is passed, which is the lever.startRpcSessiontherefore respawns once when the first spawn dies with omp's own sentence (isUnrestorableModelFailure,session/resumable-model.server.ts), choosing the replacement from: the model the command itself asks for (aset_modelcarries the operator's pick), the model the dropdown persisted (omp_selected_model), thenconfig.yml'smodelRoles.default— validated againstomp models --json --kind all, the union of what omp can actually resolve (the chat picker is not that set: it filters disabled providers and per-model hides). Nothing is read on a healthy spawn, so the common path is byte-identical. The session then comes up on a model that works and the command that triggered the spawn still lands, so a model change on an old chat applies as the user intended. Pinned byresumable-model.recovery.test.ts, which drives the real spawn path againsttest-support/fake-omp-restore.ts(a scripted child that dies exactly this way without--model): two spawns, the second carrying--model kenari/deepseek-v4-flash, the wrapper alive and registered — plus an unrecoverable case that still reports omp's own sentence rather than swallowing it. -
A refused send says why.
executeSendrolls the optimistic bubbles back on a failure and used to leave it there: the operator's turn VANISHED with no explanation, which is the reported "the prompt failed to send". The server's reason is now reported through the same toast channel the steer path uses (reportActionError, passed down fromChatTimeline), so a dead child or a session another process owns reads asPrompt not sent: <reason>instead of nothing. Pinned bysend-refusal.test.ts(the reason travels, a reasonless refusal still reports, a delivered send reports nothing), and the three send suites share their harness throughsend.test-util.ts. -
An image attachment needs an outbound frame that stays on ONE line, and protocol v2 chunking is the wrong direction to reuse.
negotiate_protocolis advertised by omp and answered{protocolVersion:2}, but itsrpc-uistdin loop has NOrpc_chunkhandler: measured on 18.14.0 and 18.16.0, each chunk record came back{success:false,error:"Unknown command: rpc_chunk"}and the prompt was never dispatched — 6 records for a 1.32 MB image, noagent_start, no ack, andsettleCommandTimeoutreset the child withThe OMP session stopped responding and was reset.The same payload as a single 1.32 MB line (and a 30 MB one) is accepted and acked in ~21–26 s, soencodeRpcFrameLine(src/shared/lib/omp/rpc/frame.ts) never chunks in that direction and refuses only pastMAX_OUTBOUND_FRAME_BYTES(64 MiB). The decoder still reassembles chunks, because omp → Kabmo frames DO use them. -
An image-bearing prompt gets ack budget of its own (
IMAGE_PROMPT_ACK_TIMEOUT_MS, 120 s; text stays at 30 s). omp does not ack an image prompt at dispatch: it stores the bytes, downscales them and asks the vision model for a description first. Measured on 18.16.0 — a plain prompt acks in ~0 ms, a 1 MB PNG in 21 s, a 30 MB one in 26 s (size-independent, dominated by that model call). The cost of being wrong is not a late report: an ack overrun runssettleCommandTimeout, which RESETS the child and destroys the turn the operator just sent (promptAckTimeoutMsreads the payload, so the router and the BTW side question agree). -
A refused attachment is a sentence, not a reset.
validateAgentImagesrefuses over 20 images, over 20 MB per image or 40 MB aggregate withImages up to 20 MB are supported.; before the framing fix a >1 MiB payload had no such gate on the outbound side and instead timed out, so the two limits must stay in step withMAX_OUTBOUND_FRAME_BYTES. -
The INBOUND ceilings are the server's, and a damaged chunk costs one frame — not the child.
readyadvertisesmaxFrameBytes/maxReassembledFrameBytes, soRpcFrameDecoder.setLimits()adopts them instead of trusting the module constants; a fault used to rundispose(0), which tore down the child's LSP servers, browser targets and prewarm slot for one lost event, and now emits onenotice(capped atMAX_PROTOCOL_ERROR_NOTICES, 3) and resyncs at the next intact frame. The size of what that protects:get_available_modelsis 522 KB on this machine, within a factor of 2 of the ceiling, a 3000-itemset_todosis 1.33 MB — measured on 18.16.0, v1 answersRPC response exceeded the transport limitwhile v2 delivers it as 6 chunks (chunkId rpc-1,byteLength 1331002, largest physical line 349,629 bytes) that reassemble byte-exact. -
An aborted run is identified at
message_end, not atagent_end. omp compacts an oversized terminal frame by dropping every message it already delivered throughmessage_end(leavingmessageCount), and the aborted assistant message is one of them — measured on 18.16.0,message_end(role: "assistant",stopReason: "aborted") arrives BEFOREagent_end. A settle that read only the frame reported a stopped run as finished, then titled the session, audited the goal and released the queued follow-up for a turn the operator had cancelled. 12.7% of the runs in this workstation's own store (494 of 3901) exceed the 1 MiB ceiling that triggers the trimming, soSessionFrameHost.runAborted(set inhandleMessageEnd, reset atagent_start) is the primary source andagent_end.messagesremains the fallback for a host that attached mid-run.
-
read xd://<device>is the device's DOCUMENTATION, not a call, and it is the READ panel. omp'sXdProtocolHandler#usageanswers a read ofxd://(the listing),xd://<device>andxd://<device>/<topic>withxdevDocs— the# <name> — <title>page — and its own reader has noxd://read card (unlikeproc://andcfg://), so it draws an ordinary read. Dispatching by device instead sent the doc page to the device's panel:read xd://lspdrew the LSP diagnostics card,read xd://mcp__codegraph_explorethe MCP argument/result card, andread xd://eval/browser(theevaldevice'sbrowsertopic) the eval card — three panels for one class of call.isXdDocRead/xdDocPath(tool-renderers/registry.ts) gate on the READ transport plus anxd://path, tested beforexdDevice; the WRITE transport is untouched, becausewrite xd://lspgenuinely IS a call.xdDocPathreturns the FULL path —xdDevicereportsevalforxd://eval/browserand the card named the wrong thing. -
A doc read's URL is its identity, so the card shows it.
toolCardSubtitlehides a barexd://URL because for a device CALL the URL is transport (the device names the action); for a doc READ the URL is what was read. The card was otherwiseRead Donewitharia-label="Expand Read"— nothing naming it. Verified in the browser:Read · xd://eval/browser · 77 lines. -
A path with no language answers
text, notjavascript.getLanguageFromPathdefaulted tojavascriptfor an extensionless file, an internal URL or a web URL, so areadof one was badgedJAVASCRIPTand its prose was tokenized as code. omp's owngetLanguageFromPathreturnsundefinedfor the same input, andtextis a Shiki SPECIAL language — always loaded, no grammar fetched, emitted escaped and uncoloured — so the badge and the tokenizer both stop claiming a language the input does not have (verified:src/x.tsstill readstypescript). Aread xd://<device>reached this badge only until it was given its own markdown branch (below); it now readsMarkdown. -
The read SELECTOR comes off the path first, or the language is lost with it.
readmay name its lines on the path itself —src/App.tsx:23-300:raw— and the extension was read off the raw string (tsx:23-300:raw, an unknown extension), sogetLanguageFromPathansweredtextand the code surface rendered unhighlighted. Only a:N-Msuffix was ever stripped; measured on a real session store, 9517 of 18128 read paths carry a selector and 1268 of those — every:raw,:imgand comma list — were missed.stripReadSelector(shared/lib/fs/paths.ts) peels omp's whole grammar (:N,:N-M,:N-,:N+K,:-N, a comma list,:raw/:conflicts/:img, and a compound:1-50:raw/:raw:-60), mirroringsplitPathAndSelin@oh-my-pi/pi-tui/tools/read.ts— including its trailing rule (a chunk must END in a digit,.or-, which is what rejects the in-flight:50+) and its conservatism about a barea:1-50filename. A URL is returned untouched: its colon can be a PORT (http://host:8080/xwould otherwise lose:8080to the line-range rule) and no fs route ever receives one. It is used by the language detector, the Read panel's/api/fs/read+/api/fs/rawpath (x.png:rawread as an unknown extension, so the image sniff said "not an image") andgetFileExtension. Verified in the browser on the:23-300:rawsample: badgetsx, 41 Shiki spans coloured; the plainapp/types/chat.tsread still readsTYPESCRIPTwith 63 coloured spans. -
A
text/markdownread renders as prose. omp draws it as the document it is (details.contentType === 'text/markdown' ? md(text) : code); the panel had no markdown branch, soread skill://diagnoserendered# Diagnose ## Steps 1. Reproduceas one code block — the file's headings, lists and links came out as literal syntax. 86 internal reads carry that content type (skill://11,omp://22+,agent://), and 38 real.mdfile reads do too. The source is omp's owndisplayContent.text, neverrawContent: omp prefixes every row of the raw output with its file line number (1|# Diagnose) and a markdown parser reads that gutter as content, turning the heading into the paragraph1|# Diagnose. The gutter-stripping parser (parsedCode.cleanCode) is only the fallback, because it needs TWO numbered rows to recognise the format — a one-row document (read xd://propose, a real payload) kept its1|prefix through it and rendered as the paragraph1|Write your plan's <slug> …. -
A
read xd://<device>is markdown too, even though omp tags ittext/plain. The device documentation (# <name> — <label>,## Schema, a ```ts fence) is the same prose askill:///`omp://` read carries; only `XdProtocolHandler`'s hardcoded `contentType: "text/plain"` distinguishes it, and the panel had no branch for it — measured over every `xd://` read of a real install (220 rows, 11 distinct documents): all of them rendered as one `` of literal syntax behind a `TEXT` badge, `# ast_edit — AST Edit` and `## Schema` included. `isXdDocRead` widens the markdown predicate, so the badge reads `Markdown` and the prose renders as prose (verified in the browser: badge `Markdown`, no `
`, the card body is `.prose-content`). A FAILED doc read is excluded — `read xd://nope` answers "No such tool: …", a refusal rather than a document, and it keeps the code surface.
-
The demo dataset carries a doc read.
virtual-devices-sessionrendersread xd://eval/browserwith the measureddetails(contentType: text/plain,totalLines,displayContent), so the badge, the URL subtitle and the prose surface are all exercised underMOCK=true.tools-sessionlikewise carriescall_01b_read_selector— a read whose path issrc/App.tsx:23-300:raw— so the selector strip is exercised in the demo, not only in a test.
-
A
readof a picture answers with the picture, so the panel paints the RESULT's bytes — never a re-read of the path it names. omp's toolResult carries{type:'image', data, mimeType}beside its text note, and externalizes anything large to the content-addressed blob store (blob:sha256:<hash>; measured on this install, 421 of 435 image blocks across the session files are refs). Both parse paths now carry it:extractToolImages(src/shared/lib/omp/session/tool-images.ts) is applied by the reload pass (collectToolOutputs+ the inlinetoolResultblocks) and by the live fold (recordToolResult,tool_execution_end), landing onToolCallData.images. -
The old path-only reconstruction was broken for exactly the reads people screenshot. The panel pointed
/api/fs/raw?path=<target>at the tool call's path, but that route only serves paths inside the browse scope andreadroutinely names one outside it (/tmp/shiki96.png) — so the panel drew a broken image while the bytes sat in the transcript.readFailed(status: 'error'/isError) suppresses the fallback too: a failed read ("Path '/tmp/x.png' not found") names a picture that is not there, and pointing an<img>at it drew a broken thumbnail over an error message. -
Blob bytes are served by
GET /api/omp/blob?hash=(src/server/routes/omp/blob.ts).readBlobImageresolves the content type from the BYTES first (getImageMimeFromBytes, magic-byte table infile-kind.ts) and from the sibling extension link second, because omp stores the blob under its content hash and the extension lives only on a hardlink beside it — and because the type is not cosmetic: a 96×96 PNG read came back as a JPEG blob, andimage/*is what makes the browser paint instead of download. The hash feeds apath.joinagainst the store, soreadBlob's canonical-digest guard is the security boundary (verified:../../etc/passwdand a truncated digest both 404 before touching the filesystem). An inline payload becomes adata:URL instead — re-encoding megabytes into every session load is what the store exists to avoid. -
A tool result's picture and a rendered diagram open into ONE full-screen surface. An
evalcard's screenshots went throughModal+ImageViewer— a centeredmax-w-4xlbox with a header row and a paper footer bar over a 70vh stage — while clicking a mermaid diagram in the same timeline openedDiagramViewer: full-bleedfixed inset-0, no header, a floating pill at the bottom centre. Measured in WebKit at 1440×900, the diagram's overlay was1440×900at(0,0)with the pill inside it; the picture was a boxed panel of the same timeline. Both now render throughcommon/fullscreen-viewer: it measures the drawing (offsetWidth/offsetHeight), fits it with a 112px margin and never past 100%, zooms around the cursor on wheel, drags to pan, toggles fit/100% on double-click, and owns Esc/+/-/0, the body-scroll lock and the focus handoff.common/diagram-viewerstates only its SVG snapshot;common/image-viewer/fullscreen.tsxstates only the<img>plus its loading overlay and its decode refusal — a second copy of the overlay is how the two previews drifted. -
The picture is measured at its NATURAL size, so the shell needs
max-width: noneon it. Tailwind's preflightimg { max-width: 100% }clamps the element to the stage's width before the transform is applied, so a 1440px capture measured as "viewport wide" and the fit scale compounded on that — the image opened smaller than the viewport allowed and the percent in the pill named a scale of a size that was not the file's..fullscreen-viewer-canvas > img { display: block; max-width: none; max-height: none }keeps the measured box equal to the decoded pixels. Verified in the browser: a 1440×900 capture fitted at 88% ((900−112)/900), wheel-zoom at the cursor reached 160%, drag panned,document.body.style.overflowreadhiddenwhile open, and Esc and the pill's X both closed it and restoredoverflowto empty.
-
Every injected
custom_messagerenders, including the ones omp itself hides. omp writes prompt injections withdisplay:falseand its own transcript walk skips them; Kabmo deliberately does not, because a session's JSONL is the record a reader may want in full. Somid-run-todo-nudge("7 todo items still open…" — 468 entries across the author's 931 session files),todo-error-reminder,plan-mode-context(6.8 KB),plan-mode-reference(27.5 KB),image-attachment-description,orchestrate-noticeandeval-state-contextall appear as "System Notice" cards. Measured on the author's install: 758 such entries, ~232 KB, 524 of them producing a card (the remaining 234 aresystem-prompt-digest, which carries only a hash and nocontent, so it yields no notice).noticeFromCustomMessagefilters exactly two things:session_exit(runtime plumbing with no prose) and the chamber's ownchamber-goal-state/chamber-plan-statemode bookkeeping. -
displayis deliberately NOT the gate, in either direction. Filtering on it would hide the goal injections (GoalNoticeis the only slot for an objective and its budget), the loop guards (thinking-loop-redirect/tool-call-loop-redirectare the only record that a turn was cut short) andultrathink-notice/xdev-mount-notice/resolve-reminder— all of themdisplay:falsein omp too. Do not "fix" the noise by adding a denylist: that decision was made and reversed, and a reader who wants the full transcript wins over a tidier one. If the volume ever needs addressing, the lever is a per-row collapse inSystemNotice(it already collapses by default), not a drop in the parser. -
eval-state-contextarrives in TWO entry shapes, and both must keep rendering. omp 18.12.0 persists it at startup viaappendCustomMessageEntry(it was in-memory only before), so a resumed session that ever usedevalcarries it — astype:"custom_message"in some builds and astype:"message"withmessage.role:"custom"in others. The second shape reaches the timeline through the assistant branch oftoChatMessage(messages-map.ts), not throughnoticeFromCustomMessage, which is why both paths are pinned separately. -
A
developer/system-role message is a NOTICE row, never assistant prose, on BOTH paths. omp writes harness nudges this way — the DSML tool-call-leak prompt ("Tool call failed: your previous response tried to invoke a tool…", injected by omp's own agent loop after it strips a leaked DeepSeek tool call), a rule violation, a compaction resume tail. The live mapper (mapper.ts) and the JSONL reload (messages-map.ts) both go through one shared rule,developerTurnNotice(src/shared/lib/chat/notice-row.ts): the text becomesnotice,contentstays empty, andisNoticeRowrenders it as a System Notice card. The reload path once folded the role ontoassistantcontent —roleFordoes that — so the raw harness prompt, DSML markup and all, reappeared as if the model had said it after a reload (measured: 5 DSML nudge rows across this install's session files), and its text joined the run's copy payload.roleForkeeps folding developer ontoassistant; the notice branch lives before that fold is used, which is what makes the two paths agree. -
A
narrationthinking block is answer text, and the split lives in the shared parser. omp 18.12.0 marks prose the model addressed to the user asnarration: trueon athinkingblock (decoded from the Anthropic/Bedrock thinking signature), and every omp surface presents it as reply text (presentNarrationAsAnswer, used by the TUI's streaming reveal, print mode and the ACP mapper). The Kabmo folded everythinkingblock into the collapsed "Thinking" accordion, so a reply sent between two tool calls vanished from the transcript.parseMessageBlocks(parse-message-blocks.ts) now pushes a narrated body intotextPartsand leavesthinkinguntouched — stated once, because both the live fold and the JSONL reload read it. Only the literaltruepromotes a block; a truthy string or a provider's own marker must not move reasoning into the reply.narration.test.tscovers the core rule, the block ordering, thetextfallback and both adapters end-to-end.
-
proc://is omp's device for background jobs, project services and live agents, and it is reached through theread/writeTRANSPORT — so the URL, never the tool name, decides the panel. omp replaced thehubtool with it (hublast used 2026-09-24;proc://from that same day on; 298proc://calls and 503hubcalls in the author's session store). The grammar isinternal-urls/proc-protocol.ts:proc://lists,proc://<id>reads status/log,write proc://<id>sends stdin (empty = Enter),write proc://<id>/killcancels a job or stops a service,write proc://<id>/modesetspersist|session|detached.toolPanelKind(tool-renderers/registry.ts) testsprocPathOf(tool)FIRST — before thexd://device and before the tool's own name — andresolveToolKeyreturnsproc, sowrite proc://x/killis a Proc card and not the EDIT panel (which rendered the stdin payload as "Written File Preview") whileread proc://xis not the READ panel (which rendered the service log as file contents under ajavascriptbadge). -
One reader for every result shape, in
src/shared/lib/omp/session/proc.ts. Measured shapes ofdetails.proc:{action,daemon}(stop/stdin),{action,daemon,input}(stdin),{action,daemon,mode},{daemon,log,terminalRows}(a service read),{job,log}(a job read),{jobs,agents,daemons}(the listing),{op:'cancel',jobs,cancelled}(a job kill). The legacyhubtool carried the same keys at the TOP level ofdetails({op,daemon},{jobs},{daemons}), soprocViewOfprefers the nested bag and reads through to the top level — oneProcViewfor both, which is whyhub'sPANEL_KINDSrow is'proc'and not a second panel.procOpLabelmaps omp's action to the word a reader sees (stop|kill→stop,read|list→list), andprocRequestOp(path, toolName)resolves the one ambiguity the path alone cannot: a bareproc://<id>isstdinon the write transport andreadon the read transport. -
panels/Proc.tsxis the body (it replacedHub.tsx, which only ever readdetails.jobs/details.items). It draws the daemon fact strip (state with its own tone, pid,up/ranspan, exit code, restarts, persist/detached), the stdin payload a write sent, a job row, thecancelledoutcomes a kill returned, and the listing as three groups (Services / Jobs / Agents). Terminal rows are ANSI-stripped — omp hands the log back terminal-formatted (\u001b[0m\u001b[2;38;5;11m$\u001b[0m …), and the panel is not a terminal. A named process is deliberately NOT echoed as raw text under its own facts (Started kabmo: ready pid=43148 …underready · pid 43148is one sentence twice); a FAILED call still shows its reason. -
The span a daemon reports is the span it RAN, not the time since it started.
procUptimeends atexitedAtwhen the daemon exited — a service that died an hour ago has not been up for an hour. Verified in the browser against a real transcript: the card readexited · ran 16m 29s · exit 0, and the header facts readstop · exited · ran 16m 29s · exit 0. -
A RUNNING task row carries live telemetry, and ONE formatter draws it for both cards (
src/shared/lib/omp/session/job-progress.ts, omp 18.13.0). omp liftsrequests,cost,contextTokens,contextWindowandstageout of a task's progress record into the job snapshot behindwaitandread proc://, which is what makes its own row read… · 90 req · $18.40 · ctx 160K/1M · stage: implementing; before this the panels parsed the model and the clock and dropped every number about what a running subagent was spending. The FIELDS and their order are omp's; the token rounding is Kabmo's own (formatCompactTokens→163.8K/1.0M) so a job row cannot disagree with the context ring beside it, and the cost cutoff IS omp's (<$0.01below half a cent). Gated onstatus === 'running'for omp's own reason: a stored snapshot must never paint a live counter over a settled row. The wait row already shows the percent as a chip, so its line omits the estimate; the proc row has no chip and carries~55%. Verified in Chromium on the demo session: expanding the card rendered90 req · $18.40 · ctx 163.8K/1.0M · ~55% · stage: implementing. -
A job row LEADS with the model's intent, and the command sits under it (
jobSubject, same module, omp 18.15.0). omp now records theiintent of the call that started a job on the job itself, and its own/jobsrows,proc://listing and jobs sheet print it before the command line — becausebun run devdoes not say what the job is for. Both Kabmo cards parsedlabelalone, so the purpose the model had already written was dropped. Measured with the release's ownsnapshotJobs, given a bash job whose call carriedintent: "Start the dev server": it comes back as{id:'bg_1', type:'bash', status:'running', label:'bun run dev', intent:'Start the dev server', durationMs:42000}.jobSubjectreturns{primary: intent, secondary: label}so the intent is the subject and the raw command the muted line beneath it; with no intent (everytaskjob, and every job recorded before 18.15.0)primaryIS the label and there is no second line. It is one resolver because thewaitcard's HEADER (card-header.ts), both job rows, and theproc://cancelled rows all name the same job — three copies is how a card and its row start naming different things. -
Facts and phrases ride the same reader.
src/shared/lib/chat/tool/proc-facts.ts(split out —summary.tsis at the size ceiling) produces the chips, andtoolSummaryguards itsread/writebranches withisProcso aproc://write can no longer report1 lines(the line count of its own stdin payload) or aproc://read a file size. A cancelled job is excluded from the process count — counting it said1 process · 1 job cancelledfor a kill that found exactly one job.describeToolActivityreturnsStopping <id>/Sending input to <id>/Setting mode on <id>/Reading process <id>/Listing processes, becauseReading proc://kabmo-dev/killdescribes a service stop as a file read. -
A
bashthat launches a named service answers withdetails.service— the same snapshot, read by the same code. 442 real results carry it ({name, state, ready, timedOut, pid}).Bash.tsxrenders it as a strip above the command (name, state, pid, span, exit code, and theread proc://<name>it can be inspected with) andbashServiceFactsgives the collapsed card its chips; without either, the only thing the card said about a live dev server was its exit code. Verified in the browser on a real session:SERVICE · tls-fixed · ready · pid 81406 · read proc://tls-fixed. -
A minimized
bashresult says so, and the lossless original is one click away (src/shared/lib/chat/tool/minimized.ts, omp 18.16.0). omp's shell minimizer compresses verbose output (git,npm,cargo, …) and records the rewrite indetails.meta.minimized—{filter, inputBytes, outputBytes, artifactId}— with the untouched stream saved beside the session as<id>.bash-original.log. Measured on a real child (git --no-pager login a 60-commit repo):inputBytes: 10970,outputBytes: 3905,artifactId: "0"; the field arrives on the livebashresult AND on the reloaded transcript, so both paths read it.minimizedOutputOfrefuses a record missing either size rather than printing→ 0 B. The chip ranks ABOVE the line count in the collapsed row, because the count describes the rewrite; a 2-fact row would otherwise fold the qualifier into+1and hide it behind the number it qualifies.artifactRefOfreads the minimizer record FIRST and returnskind: 'bash-original'(already inARTIFACT_KINDS, so the route and reader needed no change), withelidedBytes = inputBytes - outputBytes— a truncation record only ever names the already-rewritten stream, so preferring it would have opened the wrong file. Verified in the browser on a real 18.16.0 session:Minimized · git · 10.7 KB → 3.8 KB · the output below is the filtered rewriteabove the command window, and the chip's modal at10.7 KB · 360 lines · 6.9 KB elided inline. -
A numbered code block is ONE component (
shared/numbered-code.tsx), because six panels each stated the line box themselves and three had drifted.Read,Edit's write preview,ExcerptCode,Eval(twice),JsonCodeBlockandArtifactBodyall drew a gutter beside code, and every one of them restated the box in Tailwind classes. Measured in the browser:JsonCodeBlockwas the worst — the gutter wastext-[10px]and the codetext-[11px], both under an inheritedleading-relaxed, a RATIO, so the row boxes were 16.25px against 17.875px and each number sat 1.63px higher than its line; by line 20 the number was 30.9px above the code it labels. It backs the Bash console output, theevalresult, the card's input JSON,taskresults and the full-output reader, so the defect was visible almost everywhere.ExcerptCodewas a constant −1px for the same reason (half-leading is(box − font) / 2, so a smaller face sits higher under the same box), andEdit's write preview rendered one MORE gutter row than it had lines (81 numbers beside 80), because its…truncation marker was gutter-only — every number past the marker sat a line above its code. The component makes those unrepresentable rather than merely fixed: the box is an explicit px pair applied to both columns as inline style (never a ratio, never an arbitrary-value class a build could drop), both columns carry the same font size (a gutter is differentiated by colour and weight, never by size), and both sides are one element per line so the counts cannot disagree — a single<pre>with<br>separators and a row-per-number gutter is a pair that agrees only by coincidence, since a trailing<br>, an empty last line, or a highlight that returned fewer fragments moves one side and not the other. The gutter must not carry thetabular-numsCLASS: that class also setsfont-family: 'Fira Code'(tailwind.css), which beat the code column's own utility and put the two sides in different faces — a measured 1px ink offset on every row — so the feature is set inline (fontVariantNumeric) and the family is inherited identically by both. Verified in Chromium on the demo session and on a real 195-read/72-write session at 1440 and 390: 0px ink drift and matching row counts on every gutter, against 30.9px and 81-vs-80 before. Pinned byshared/numbered-code.test.tsx(the shared box, the inline-style requirement, the row-count invariants, a blank line, a missing fragment, the…marker) andpanels/Eval.test.tsx; the earlier Eval test compared the two sides'leading-[…]CLASS, which passed whileJsonCodeBlockcarried the same bug. -
The highlight memo stores the SHAPE each caller asked for, because one key has two.
highlight-memo.tsis keyed by(language, code), and two callers want different markup for the same code:highlightCodeanswers ONE inline string (structure: 'inline', no newlines) whilehighlightLinesanswers one fragment per source line. One slot for both meant the line path split the block path's string — a 7-line JSON block that had already been drawn as a block came back as a SINGLE row, soNumberedCodedrew seven numbers beside one line of code. Measured on the Ubuntu gate asExpected length: 7, Received length: 1inEval.test.tsx, and it is a real card: the eval result's JSON is drawn by both paths, and which one ran first depended on the file order. The entry now carriesblockandlinesseparately, and the character budget counts both. -
A virtual URL never reaches
/api/fs/read. The Read panel's lazy fallback points that route at whatever path areadnamed, andproc://kabmo-devis not a file: the route refused it and the panel printed// Loaded file: proc://kabmo-devas if that were its contents.isVirtualPath(shared/lib/fs/paths.ts) gates the fetch; a bareC:\x(one colon) stays a path. Verified in the browser: zero fetches for the virtual URL, andsrc/x.tsstill lazy-loads. -
The demo datasets carry the real shapes.
tools-session'shubsample has its measureddetails, andvirtual-devices-sessionrenders aproc://read (a ready daemon with ANSI terminal rows) and a/kill(the same daemon exited) fromsamples/virtual-devices-proc.ts— split out because that session file is at the size ceiling. A sample withoutdetailsrenders as a fallback and hides every panel bug this section exists to prevent.
-
A tool call's card is chosen by the TOOL, never by its result — a
waitwith notoolResultis still a wait. A page reloaded while the call blocks reads the transcript, which holds the assistant turn'stoolCallblock and onetool_execution_startentry and nothing else; omp's own "Nothing to wait for: no background job or service you started is running" answer goes further and writesdetails: {}.waitViewOf(src/shared/lib/omp/session/wait.ts) used to requiredetails.op, so both shapes classified as "not a wait":toolPanelKindstill saidwait, the panel returned nothing, and the card fell through to the generic Input/Output body — the reported "wait renders as general after a reload". The tool's own NAME is now the fallback discriminator (onlywait;send/cancel/jobsstay result-only, becauseproc://owns them), and the view carriesreported: falseso no reader claims a job list it does not have (waitFactsemits the clock alone, the panel draws no Jobs section and no "no jobs" chip). -
The clock of a resultless call is its
tool_execution_startentry, which is the only place it exists.collectToolOutputsjoined that entry only for calls that HAD a result, so a reloaded call loststartedAtentirely and the panel's stopwatch had no source. It now records every start entry, and a call with no result ispending: truewithoutput: ''as a PLACEHOLDER, not an answer. -
pendingis a claim about NOW, so only a live run may make it. The same transcript is left behind by a run whose process died, and a call stuck atrunningin scrollback is the spinner-forever bug.loadSessionMessages(filePath, { liveRun })takesgetLiveRunSessionIds().has(sessionId)(routes/chat/session.ts) — the same predicateGET /api/agent/:idreports asbusy— and only then does the call render as running with no output. Measured over the author's store: 24 of 160,189 started calls have no result entry (11bash, 9eval, 1wait, and one each ofgoal/edit/write), so the shape is rare but real, and a truncated copy of a real session reproduced it exactly (details: undefined, statussuccess, empty output). -
A fold mounted by a reload owns no rows, so a late result needs the TRANSCRIPT to find its card.
toolResultsRef/lastToolMessageRefbelong to a fold that streamed the call; after a reload they are empty and everytool_execution_update/tool_execution_endhad no target — the reloaded card kept its resultless shape for the rest of the run.toolMessageFor(shared/lib/chat/omp/tool-results.ts) falls back toToolResultHost.resumedToolMessage, whichuseOmpAgentanswers from the timeline's ownlocalMessagesRef(wired fromuseChatTimeline), and ADOPTS the row it finds so the next frame pairs without asking again. Both halves are pinned bywait.e2e.ts› "a reload mid-call still draws the wait": reverting thewaitViewOffallback makes the stopwatch locator never appear, and reverting the resume lookup leaves the card readingWait Runningfor the whole 40 s budget (measured, both reverted one at a time). -
A blocking
waithas no 30-minute ceiling any more, and its result is a WINDOW, not a cap (src/shared/lib/omp/session/wait-idle.ts, omp 18.17.0). omp deletedWAIT_MAX_MSand the "Wait limit reached" answer: a wait now returns when its window elapses with nothing new, and the window climbs a ladder — 5 s, 10 s, 30 s, 60 s, 5 min — across back-to-back idle waits, resetting once the agent works in between. From the second rung it appends<system-notice>Nothing new after 15.0s of back-to-back waits…, which is what tells the model waiting is not progress. Neither the rung nor the streak is a field on the result, sowaitIdleOfparses the prose ("No reply within 5.0s.", "No service finished within 30s.") andwaitIdleLabelwords the chip (idle 10s,idle 15s total). 18.18.6 changes that sentence: it appends the ladder's next rung after a semicolon ("No reply within 5.0s; a back-to-back wait allows up to 10s.") and words a job timeout as "No job finished within 30s; …". The parser accepts both the old period and the new semicolon — a regex requiring the period made both the card's idle badge and the summary'sidle …fact vanish on 18.18.6, while persisted sessions still carry the old form. The card used to count down to the old cap (0:07 left of 30:00); that countdown claimed a budget omp no longer has and is gone. -
details.waitedis a LIST (omp 18.17.0), and the old single object is still read. One wake returns every message queued by then —messageResult(senderId, waited: IrcMessage[])— while a session recorded on 18.16.0 keeps{from,to,body,ts}in its JSONL, which is what a reload reads.WaitView.waitedisWaitMessage[]andmessagesOfaccepts both; parsing withisRecord(which refuses arrays) made the fieldundefinedand the message block vanished silently. -
Since omp 18.18.9 a received message is its OWN turn, not a wait result (
src/shared/lib/chat/irc-notice.ts,IrcNotice.tsx).messageResultanddrainPendingInboxare gone:handOffMailgives the message to the recipient session, which injects acustomType: "irc:incoming"user turn, and the wait answersWait interrupted by message.with{op:'wait', jobs:[], interrupted:true}and nowaited. The turn'scontentis the<irc>prompt envelope (tag, "reply viawrite" instructions), so both transcript mappers readdetails.from/details.messageinstead and drawIrcNotice; rendering the notice text directly would print the model's prompt scaffolding. The wait card keeps itswaitedblock only for JSONL recorded on 18.17.0–18.18.6 — measured on a real persisted entry, whosedetailsis exactly{id, from, message}. -
omp's embedded shell trace never enters the transcript (
src/shared/lib/omp/session/shell-trace.ts, omp 18.17.0). Everybashprogress frame and result carriesdetails.trace—{units, history}, withhistoryrepeating the command's output — whether or not anyone draws it on 18.17.0. 18.18.0 gates it ondisplay.shellVisualization(defaulttrue), so the field arrives unless an operator turns that row off; Kabmo's strip is the same either way. Measured on this machine: 40 output lines → 192 KB of frames against 19 KB on 18.16.0; 120 lines over 73 s → 242 frames / 9.2 MB; a 40 000-line result → 311 KB frames;seq 1 30000→ a 201 KB trace on the result.stripShellTracedrops it inEventFanout.emit(the one point every subscriber is reached — thesession:<id>topic publishes straight to each open tab) andwithoutShellTracedrops it when a transcript is read back from disk. A frame over 1 MiB is legal only because Kabmo negotiates protocol v2: measured, a 1005 KB frame arrived as 72rpc_chunkrecords.
-
The mic button runs omp's OWN speech-to-text, not a second implementation. omp ships STT as a TUI feature —
stt.enabled,stt.modelName,stt.submitTriggerunder Interaction → Speech — with local on-device models and no API key. It is turned on by theapp.stt.togglekeybinding and captures the microphone of the machine running the TUI through@oh-my-pi/pi-natives'AudioCapture. -
None of that surface reaches a web client, which is why Kabmo drives the WORKER instead. Verified against omp 18.4.10:
stream_start/stream_audio/stream_stop/stream_cancel/transcribe/downloadare all answeredUnknown commandover--mode rpc(the surface Kabmo's agent bridge uses), and no STT entry exists inget_available_commands— it is neither a slash command nor a tool. What omp does expose isomp __omp_worker_stt, and its transport is Bun IPC, not stdio: the worker is spawned withstdin/stdoutset toignore,serialization: "advanced", and frames arrive on theipcchannel. A stdio client sees a silent, unresponsive process. The Kabmo runs on Bun, soomp-stt-worker.tsspawns the same worker and speaks the same frames. -
Frames (request/response by
id): →{type:'ping', id},{type:'transcribe', id, modelKey, audio, language}; ←{type:'pong', id},{type:'progress', id, event},{type:'transcription', id, text},{type:'error', id, error}.audiois aFloat32Arrayof normalized samples at 16 kHz, sent as structured clone over the IPC channel — NOT base64 and not an encoded file (a base64 WAV string fails with "AudioContext is not available in your environment"; aUint8Arrayfails with "expects input to be a Float32Array"). The browser side captures PCM16, andsrc/server/routes/dictation/ws.tsconverts withpcm16ToFloat32beforetranscribe— so the PCM16 lives on the WIRE (browser → server), not in the worker frame. omp 18.8.x also exposes a STREAMING path (stream_start/stream_audio/stream_stop/stream_cancelwithpartial/segmentevents, segmented by the worker's endpointer) which Kabmo does not use yet: it still sends one utterance per socket, which is what omp's own TUI does (its text appears on release, not per word). -
Model keys are omp's, and the default is deliberately NOT omp's. The four keys are
whisper-base,whisper-small,whisper-large-v3-turbo,parakeet-tdt-0.6b-v3; anything else answersUnknown stt model. omp's own default is Parakeet v3, which covers 25 European languages only — so Kabmo defaults towhisper-base, the smallest MULTILINGUAL tier (~80 MB on first use). A first run that downloads 465 MB to transcribe a non-European language wrongly is the worst possible default. - One utterance per socket, and the audio travels in ONE frame. Streaming chunks while the user speaks buys nothing: omp's STT is not incremental (its own TUI inserts text on release), so a chunked transport would only add reordering and reassembly for a result the final decode replaces. The socket exists for the other direction — the server pushes model download progress while a first-run decode waits on a fetch.
-
The two progress numbers under the same field are different quantities, and neither is dependable enough to trust blindly.
progress_totalcovers the whole download whileprogresscovers a single file, so only the former may set the figure — the per-file value taken as the total jumps backwards at every file boundary. But on a real first-run fetch (omp 18.4.10, ~76 MB at ~68 KB/s) the total reached 100 within the first eight seconds and then climbed past it to 2654 while the files were still arriving, becauseloadedaccumulates across retries whiletotalstays fixed.summarizeProgresstherefore reports aprogress_totaloutside 0..100 as INDETERMINATE (percentnull, status stays "downloading") instead of pinning a 100 that would sit on screen for the whole download and read as "finished but stuck". The route then drops frames that do not move the percent by a point or flip the phase — a single download emits hundreds of them. -
Capture uses
AudioContext+ScriptProcessorNode. The node is deprecated in favour ofAudioWorklet, but it is the only capture path every target browser ships (Safari included) without serving a separate worklet module.MediaRecorderis not an option: it emits Opus/WebM, which the worker cannot decode. -
Every shell needs its own capture wiring, and each one fails differently. The page's
getUserMediais the same call everywhere; what differs is the host, and a missing piece is silent in a different way on each platform:-
Android WebView needs
MODIFY_AUDIO_SETTINGSin the host manifest, and nothing in the app says so.RECORD_AUDIOgranted plusonPermissionRequestgrantingRESOURCE_AUDIO_CAPTUREis not enough: Chromium's Android audio path selects a communication device before it opens the capture device, and that selection is gated onMODIFY_AUDIO_SETTINGS— a NORMAL permission, so there is no prompt, no settings row and no runtime check to fail. Without it the WebView logsUnable to select communication device!andgetUserMedia({audio: true})rejects withNotReadableError: Could not start audio sourcebefore anyAudioRecordexists, which is why the app's own permission grant looks correct while the microphone never opens. Chrome declares the permission in its own manifest, so the same page records in Chrome on the same device and not in the shell. -
macOS needs
NSMicrophoneUsageDescriptionin the bundle (a missing key TERMINATES the app on first use, it is not a refusal) andWKUIDelegate.webView(_:requestMediaCapturePermissionFor:…). WebKit's documented default for an unimplemented delegate method is.prompt, and this shell has no prompt UI, so the request never resolves — the mic button looks dead whilenavigator.mediaDevicesexists and the click runs.ShellUIDelegategrants microphone/camera and denies anything else;MediaCaptureWindowTestspins the selector, because a near-miss Swift signature still compiles. -
Linux (WebKitGTK) needs
WebKitSettings:enable-media-stream(default FALSE, sonavigator.mediaDevicesis undefined and the mic button never renders) and an answer to thepermission-requestsignal (default: deny).configure_viewsets the setting and allows onlyUserMediaPermissionRequestaudio/video, which is bounded by the navigation policy — the webview only ever hosts the server's own origin. -
iOS was correct from the start:
ShellNavigationDelegateis both delegates, grants the capture types, andInfo.plistcarries both usage descriptions. -
Windows is the one shell with no code for it: WebView2's
PermissionRequesteddefaults toCoreWebView2PermissionState.Default, which shows WebView2's own prompt ("This file wants to use your microphone"), so capture works after Allow. Nothing in the shell grants or denies, so that is the platform's default rather than a decision this repo made. The composer used to report every non-NotAllowedErrorrejection as a bare "Could not open the microphone.";shared/lib/dictation/capture-failure.tsnow names the DOMException, andManifestCapturePermissionsTestpins the Android manifest (it also asserts everyManifest.permission.*the chrome client grants is declared).
-
Android WebView needs
-
The worker handle is anchored on
globalThisfor the same reason the database and terminal store are:bun --hotre-evaluates the module while the spawned worker (and the model it holds in memory) lives on, and a module-level binding would orphan the child with no handle left to kill it. It shuts down after 10 minutes idle, and/reload-enginerecycles it alongside the other omp processes. -
The WebSocket upgrade is origin-checked with the same predicate the terminal uses (
server/lib/http/same-origin.ts), because dictation triggers real work — a model download and a decode — and an upgrade carries no preflight to stop a cross-origin page from asking for it.
-
The list is its own table, not a scan of the transcripts. A session's user turns live in omp's JSONL (or the
chat_sessionsoverlay), so the merged list a pendingnew-…chat asks for would mean reading every session file on the machine.prompt_history(src/server/lib/chat/schema.server.ts) holds one indexed row per dispatched prompt, andGET /api/chat/prompt-historyanswers both scopes:?sessionId=for one chat, no parameter for the merged list. Duplicates collapse to their newest occurrence (GROUP BY text), and the route is mounted BEFORE/api/chat/:sessionId— the static segment shares its position with the parameter route. -
Recorded at the HTTP boundary, never inside the RPC dispatch.
POST /api/agent/:sessionIdrecordsprompt/steer/follow_up/abort_and_prompt(the vocabulary isRECALLABLE_COMMAND_TYPESinshared/lib/chat/composer/history.ts), andPOST /api/agent/newrecords the first prompt of a new chat under the id the child reported. The dispatch also carries Kabmo's own control prompts (/kabmo-mode …, title requests, goal kickoffs), which are not something the operator typed. A repeat of the session's newest entry is dropped, so a refused send that the queue replays does not double up. -
The cursor rules are pure and tested (
shared/lib/chat/composer/history.ts):-1is the draft, ArrowUp enters the list at its newest entry, ArrowDown walks back to the draft, neither end wraps, and an arrow only recalls when the caret is on the list's edge of the TEXT (first line for up, last line for down) — a multi-line draft keeps its normal arrow behavior. A modified arrow (Shift/Ctrl/Cmd/Alt) and an IME composition are never consumed. -
One GET per entry into the list, and none before it.
useComposerHistory(client/hooks/chat/composer/history.ts) fetches on the first ArrowUp from the draft, so a prompt sent a second ago is the newest entry; everything after that is in memory. An emptied draft (a send) resets the cursor, so the next recall starts from the newest entry again. Verified in the browser against a temp database: ArrowUp in an open chat requested?sessionId=smoke-sessionand filled the box, ArrowDown restored the typed draft, and the same key on a pendingnew-…chat requested the merged list and recalled a prompt from another session.
-
The Kabmo's copy of a conversation is an OVERLAY, not a transcript. For a session omp owns on disk the session JSONL is authoritative (
loadSessionMessages→mergeOmpAttachments), and the DB row carries only what the JSONL cannot record: the user turns — the text as the user typed it, since omp delivers@agentas a task-tool delegation prompt and/skill:a bas/skill:a, plus the attachment metadata, since a text file is inlined into the prompt and its name/content/preview exist nowhere else — and the notice rows (a builtin command's output, for which omp writes no entry at all). Nothing else in the row is read:merge-stored.tsfilters onrole === 'user'and on a non-emptynotice, and no code path reads an assistant row. -
Only those rows are written.
overlayRowsForOmpSession(src/server/lib/omp/session/merge-stored.ts) narrows what the POST handler stores, gated insrc/server/routes/chat/session.tsonfindSessionFileById— the session file's existence, never the id's shape: a Kabmo-creatednew-<ts>session has no file, and there the DB is the only copy, so it stays whole, as does an omp uuid whose file is gone. Before this the client posted its entire rendered timeline on everymessage_endand the server stored it verbatim — measured on the author's install at 165.6 MB of 167.9 MB of mirrored assistant rows nothing consumes, on top of re-writing a multi-megabyte array per stream segment with no body-size guard. Verified: narrowing changed the merged timeline of 0 of 260 stored sessions compared against their own files. -
Nothing the narrowing drops is needed to place a row. A stored raw turn that no JSONL user turn relates to — a
/usageor/compactturn, for which omp writes no entry at all — is positioned by its ownstartedAtagainst the merged rows' clocks (anchorIndexForinmerge-stored.ts), never by scanning the stored array for a row the JSONL carries. That scan is what made the first version of this narrowing move those turns to the END of the timeline, after answers that came later: it resolved against the mirrored rows that are exactly what gets dropped. The scan survives only as the fallback for a legacy row with no clock to read. Verified on the author's install: of the sessions holding such turns, only the ones whose anchor the scan had been supplying changed order, and they changed to the time the turn was sent. Do not "fix" the missing assistant rows — their absence is the point. -
compactChatOverlayRowsapplies the same rule to rows written before it existed, called from the server bootstrap right after the "listening" banner (src/server/index.ts) and deliberately NOT fromgetDb(): the test suite and the CLI reach that in real mode, so a database handle must never be able to launch a rewrite of every mirrored conversation — abun testrun did exactly that, compacting a live 172 MB database. It has no marker, unlikequeue_fk_removed: the guard is per-row ("does the filter actually shrink this row?"), so the pass is self-limiting — measured 762 ms for a 173 MB overlay on the first start, then one parse-and-skip of the remaining ~5 MB — whereas a marker would leave every row written by an older build uncompacted for good, and a live server keeps writing mirrors until it is restarted. Only a row whose session file exists is rewritten, so a Kabmo-created session stays whole. The rewrite makes the freed pages reusable;VACUUMon a stopped server is what returns them to the filesystem. -
Two other writers sit deliberately outside the gate:
src/shared/lib/chat/stream-service.tsis the MOCK SSE path, where the DB genuinely is the transcript, andsrc/server/routes/chat/root.ts's action is the pre-migration writer that no client calls (its loader's?sessionId=branch likewise has no caller). -
The timeline mounts a WINDOW of its rows, and the height of everything else is a spacer. Every row used to stay in the DOM for the life of the session:
?before=paging only ever PREPENDS to the same array, so a long session accumulated nodes for every page the reader had scrolled through. Measured on this machine (production bundle, WebKit, one 9.4 MB session, ten pages of history): 107 807 nodes and 891 MB of WebContent footprint before, 2 627 nodes and 251 MB after — and not one node was released when the reader scrolled away in the old build, while a reload of the same session brought it back to 11 438 nodes, which is what says the cost is the mounted rows rather than the data.shared/lib/chat/timeline/row-window.tsis the arithmetic (measured heights, prefix sums, the visible range, the scroll offset a jump lands on) andclient/hooks/chat/timeline/row-window.tsis the DOM half (measuring, the anchor, the reveal). Three rules make it safe rather than merely smaller: heights are MEASURED, never assumed (a user bubble, a thinking accordion and a tool card with 1 000 lines are all one row; unmeasured rows take the measured average, and a 0 from a hidden row is not a height), a measurement must not move the reader (the anchor is the row at the top edge plus its offset, and it stands down when something else — a jump, the follow pin — moved the viewport in between), and the tail is an anchor of its own (a reader at the bottom follows the BOTTOM; a row anchor left an opened session 2 080 px short, outsidescroll.ts's 100 px follow threshold, so the stream silently stopped following). Two failure modes were measured while building it: the effect that subscribes to the scroller must key on the scroll NODE as state rather than on the ref (the body is behind the full-panel skeleton, so a ref-keyed effect ran once, before the scroller existed, and the timeline mounted the first rows under a viewport scrolled to the bottom), andscrollTopassignments ANIMATE because the container carriesscroll-smooth— CSSOM-View resolves the setter'sbehavior: autoagainst the element's computedscroll-behavior, so a correction loop has to writebehavior: 'instant'or it never lands.MessageListkeeps rendering every row when it is given no window, which is what the BTW panel and the pending-chat view want. -
A prepend holds the ROW the reader was on, not a pixel delta.
session-paginationusedscrollTop += scrollHeight - prevHeight, which was exact while every row was mounted. With a window, the prepended rows are estimates until they mount and are measured, so the height keeps changing for several frames after the commit — measured: "Load earlier messages" moved the reader 10 641 px off the row they were reading. The anchor is now the row at the top edge of the viewport and its own top edge, corrected on the frames that follow, and it does nothing on a frame where that row is outside the mounted window (the window hook owns the position then; the pixel delta wrote the viewport 10 500 px away).
-
One delivery attempt at a time per session — the triggers used to overlap. Every trigger — the run-end timer, the 2 s retry, and a tab's
POST /queue/deliver(which runs the attempt immediately, with no timer, because the failure it recovers from is a lost timer) — used to enterdeliverNext(src/server/lib/queue/delivery.server.ts) independently. Two overlapping attempts claim two different heads, and each requeue then decides the order the pair comes back in. Measured on this workstation: a session with eight queued follow-ups walked from positions0..7to-8..-1while the panel reordered itself between retries.deliverNextnow keeps one in-flight attempt per session onglobalThis(__ompQueueDeliveryInFlight) and every other caller shares it. -
A failed dispatch puts its row back at the position it was CLAIMED from, never below the queue.
requeueHeadQueueItemused to insert atMIN(position) - 1, which looks equivalent to "the head" and is not: with a second claim already in flight the first requeue lands one slot too low and the pair swaps.claimHeadQueueItemnow returns the row'sposition(ClaimedQueueItem) and the requeue writes it back verbatim, so an overlapping pair can never permute the rest either.listQueuealso orders byposition, rowid— equal positions must not be returned in SQLite's arbitrary order. -
omp's
agent_busyrefusal is evidence, and the wrapper keeps it. A prompt omp refuses withAgentBusyError("already processing") proves a turn is in flight — but the dispatcher used to translate it toagent_busyand leave the wrapper reading idle, so the queue'sisBusy()gate passed on every retry and dispatched at the busy child again. Measured here: 104 refusals for one session, one per retry, each one requeueing the head (the ordering symptom above).dispatchSessionCommandnow setshost.streaming = trueand armshost.runSettleon that refusal, so the queue parks untilagent_end— or, if that frame is lost, until omp's ownisSettledverdict releases the flag.
-
Three prompts in a transcript are written by Kabmo, and all three wear an envelope. The composer prepends an orchestration contract to a delegating message (
formatDelegationPrompt), a spawned child opens with a dispatched-worker brief (dispatchedWorkerPrompt), and a finishing worker sends its coordinator a child-outcome notice (renderChildOutcomeNotice). All three travel as ordinary prompts, so omp stores them asrole:"user"turns — and drawn as bubbles they were indistinguishable from something a person typed: a 1 KB contract with shell heredocs, a preamble quoting its own session id, a report from a session nobody is looking at.src/shared/lib/chat/orchestration/notice.tsowns the markers ([kabmo orchestration contract],[kabmo dispatched worker],[kabmo child outcome]), the parser and the outcome format; the server writes it,UserTurnparses it, andOrchestrationNoticedraws the card. The operator's own words stay their bubble — the contract's trailing text is split out asrest, which is why a delegating turn renders as card + bubble and a notice renders as a card alone. -
A bracketed marker, not a
customType. Only acustom_messagecarries acustomType, and these three are prompts; the marker survives omp's JSONL round trip untouched, so the live row and the reloaded row agree. The live echo is kept for a delegating turn (omp-callbacks.ts): the echo carries the CONTRACT, and keeping the optimistic text instead made the card appear only after a reload. -
A worker's outcome is reported ONCE, at its terminal end. omp retries a transient provider failure by itself and keeps the RUN open across the attempts —
auto_retry_start, a freshagent_start,agent_end {isTerminal:false}between them, andauto_retry_endcarryingfinalErrorwhen the budget is spent.retry-saga.tsfolds that intoretrySagaOpen/retryFinalError, andsettleTerminalRunreports nothing while a saga is open: a coordinator told "failed" mid-saga resent the task while the worker was still working it.runOutcomeReportedis the latch that makes a second settle (a synthesized one after lost frames, or the process exit) a no-op. -
The failure is read from omp's FLAT fields, at
message_end. omp recordsstopReason/errorStatus/errorId/errorMessageon the message itself — there is no nestederrorobject, and reading one is why a worker whose provider answered400 The model agnes-2-5-flash:free is currently unavailablereached its coordinator as the bare sentence "The run ended with error".deriveTurnError(shared/lib/omp/session/turn-error.ts) is the shared read. It is captured atmessage_endfor the same reasonrunAbortedis: omp compacts an oversized terminal frame by dropping whatmessage_endalready delivered, and the failed assistant message is always among them. Measured end to end on a real spawn: the coordinator receivedstatus: failedwith the provider's full 400 text and reported it without resending. -
A run that ends without a terminal frame is reported, and never as a success.
RunSettle's reconcile (omp answeredisSettledafter the frame stream stopped) andhandleChildExit(the process died mid-run) both emit a syntheticagent_endstraight to the fanout, which never passes through the frame fold — so the outcome a realagent_endreports was lost and the coordinator waited for a worker that had already stopped. Both now callnoteRunEndedWithoutFrame(interruptedfor the reconcile,failedwith the stderr tail for the exit). -
A busy refusal is not an outcome.
noteRefusedPromptused to reportfailedfor any refusedprompt, including omp'sagent_busy— the run is live (often mid-retry), nothing was delivered, and Kabmo's queue re-sends.AGENT_BUSY_REFUSAL_REis the gate. -
The notice window is a timer, so a restart strands it. Outcomes stage in
session_noticesand a 2 s timer turns them into onequeued_messagesrow; a child that finished during a restart (or abun --hotreload) left its row with nothing to flush it.drainPendingNoticesruns fromrunAfterListenTasks, andflushNoticelogs when the parent cannot be resumed — a coordinator that never hears from a worker is otherwise indistinguishable from one that is still working. -
The notice names the worker, not its brief. A spawned child's auto-title is derived from its first prompt, which is Kabmo's own brief — measured as
title: [kabmo dispatched worker]in a real coordinator's notice.titleOfdrops a title that starts with[kabmo; the session id below it already identifies the worker. -
omp-acpreports a provider failure as ordinary text, so its transcript is the record. Measured on a real spawn: the agent answered400 The model agnes-2-5-flash:free is currently unavailable…as an assistant message and ended the turn withend_turn— nostopReason, noerrorMessagein the envelope — while omp's own JSONL for the same turn carriedstopReason: "error"and the same text. Reading only the envelope reported the worker ascompletedand handed its coordinator the error as if it were a report.transcriptFailure(harness/acp/turn-outcome.server.ts) reads the LAST assistant record of a harness whose transcript Kabmo can read (omp-acponly) and only when the envelope says completed; every other harness reports failure in the envelope itself, so nothing is guessed for them. A failed turn's text is no longer stored as its answer either —session_answersis whatkabmo session outputprints. -
A wedged ACP turn is bounded by silence, and closed as INTERRUPTED. ACP has no
get_stateprobe, so a turn whose agent stopped answering stayed open forever:isBusy()kept the idle reclaim away, the process lived on, and a coordinator waited for a result that could never come.TurnSilence(harness/acp/turn-silence.ts) closes it after an hour with no frame at all — a ceiling, not a detector, and six times the repo's own 10-minute background-work ceiling. It is reported asinterruptedwith the reason, neverfailed: nothing observed it fail. -
Every harness goes through the same outcome rule, and each transport names its own ending. The omp and ACP paths share one notice format but report from different events, because neither has the other's frames: omp reports from the terminal
agent_end(withretry-saga.tsholding it back across a retry saga), while ACP reports fromsettleAcpTurn, which readsAcpTurnEndInfo. Two ACP gaps came from inference rather than the protocol. A v1 agent answers{stopReason: 'error'}WITH whatever it had streamed, so "did it answer" reported the turn as completed —AcpTurns.finishnow treats an error stop as a failure on its own. And the exit path emittedprompt_error+agent_endto clients only (reportAcpExit), so an agent that died mid-turn left its coordinator waiting forever; it now reportsfailedwith the stderr tail, and only while a turn is open (a process exiting between turns has no outcome to report). An ACP prompt Kabmo refused itself (AcpTurns.startthrowing "already processing") reports nothing, matching the ompagent_busyrule.
Using Kabmo
How it is built
- Architecture
- Runtime and toolchain
- App shell and layout
- Chat stream and tools
- omp engine and settings
- Plugins, skills and automation
- Desktop integration
- Workspace panels
- Providers
- Harnesses
- Tool panels
Shipping it
History