Repository navigation
fix: keep Claude notification turns separate when init beats queued - #334
Merged
Merged
Conversation
Merged
xxchan
added a commit
that referenced
this pull request
Oct 10, 2026
Release OAR and CLI 0.54.3. This PR changes only the two package version fields. **Fixed: claude's own turn stays separate from a prompt written just before it** (#326, #334) - When a background task finishes, claude starts a turn of its own to report it. A host prompt written a few milliseconds after the task's notification could see that turn's root `system/init` arrive before the prompt's `command_lifecycle queued` receipt. OAR could not yet tell that the init was not the prompt's, and did not correct it when `queued` arrived. `SessionView` then put claude's report inside the prompt's turn ("» What is 2+2?" → "The background command finished…" → "4" in a second turn with no input), and status followed it. `promptAndWait` and `awaitTurnEnd(…, inputId)` already returned the right answer. - OAR now keeps such an init unclaimed until the receipt arrives. When `queued` proves the prompt has not started, the same frame carries `input_queued` followed by `turn_active` without an `inputId`, so claude's report is its own turn and the prompt sits before the turn that answers it. Only an init seen since that write, with no native turn already running and not claimed by `started`, counts; a repeated init or `queued` reports nothing again. Live views and record replay agree. - While claude's own turn runs, status stays running instead of dropping to waiting when the prompt is queued. **Behavior changes** - In that timing, a `turn_active` without `inputId` now follows `input_queued` in the queued frame. Records written by 0.54.2 and earlier replay as before. Validation: #334 passed all 17 checks on its final head, and its merged tree equals its CI tree. Its regressions replay two recordings of real claude 2.1.292 with a scripted provider (a prompt written 20 ms after a background task's notification, which saw init first, and 0 ms, which saw `queued` first), plus a prompt written while the task still runs and cancellation while claude's turn continues. Lookout swept the delay live with no account: on claude 2.1.292 seven runs from 15 to 30 ms and on 2.1.296 fifteen runs from 15 to 45 ms, catching the init-first order three to four times on each version. Every run gave the right view and `promptAndWait` returned "4". Ferryman's recording from Ferry on 0.53.0 showed the same order. After this PR passes CI and merges, tag its exact squash commit as `v0.54.3` to trigger npm trusted publishing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: exe.dev user <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Oct 11, 2026
xxchan
added a commit
that referenced
this pull request
Oct 12, 2026
Weekly docs and consistency pass (2026-10-12). **Added** - `docs/spec/runtime-matrix.md`: **Custom model endpoints**, how to point each runtime at another endpoint through its own configuration (the recipes the behavior backends use against a scripted provider, so each runs in CI). Promised to Rower earlier. - `docs/runtimes/antigravity.md`: its own `view_file` also allows `$GEMINI_HOME`, where the server keeps its stored login (agy_acp_server 1.3.0 source), so give a session its own `GEMINI_HOME` when the agent should not see your login. **Fixed, from an audit of the docs against this week's code** - Runtime matrix: grok child ledgers stay native-only and `withChildren` is absent; opencode v2 children report context only (both rows said children are added by `withChildren`). - Runtime matrix: claude's tool arguments stream as `tool_call_input_delta` (phase `writing`), not "raw activity until the full call arrives". - `docs/runtimes/README.md`: the runtime-check link points at the dated reports, not 2026-10-06. - `docs/runtimes/inventory.md`: four inventory readers, not three. - `docs/runtimes/claude.md`: a spontaneous turn's start is reported with the prompt's `queued` when a host prompt was written just before claude's init (#334); the old sentence said always immediately. - `CatalogProvider.configured` comment: an entry as the runtime counts it, not a key known to work (matches pi.md). **Shortened** - README: the structured-output scope paragraph is now a link to the runtime matrix. - `session-graph-and-cursor.md`: the `withChildren` rule is now a link; the rule lives in `attribution.md` (which gained the two details the copy had: reports before lineage, repeated cumulative reports). Other duplicated passages (claude's `input_queued` semantics in three places, the command inventory in README and spec) are left for next week's pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: exe.dev user <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a host writes a Claude prompt just before a background notification starts its own turn,
system/initcan arrive before the prompt'scommand_lifecycle queued. The view previously attached the notification's text to that prompt. Retain the unclaimed root init and emitinput_queuedfollowed by anonymousturn_activeon the queued frame, so the notification and the prompt's answer stay in separate turns.The adapter uses that projected start for its busy state too. Repeated init/queue receipts do not create another turn, and cancelling the pending prompt leaves the notification turn running. No public types or observation-layer logic change.
Validation:
CI=1 pnpm run checkpassed (1,638 tests plus the mock behavior suite);pnpm run buildpassed.Fixes #326.