Skip to content

chore: release v0.54.2 - #332

Merged
xxchan merged 1 commit into
mainfrom
chore/release-0.54.2
Oct 10, 2026
Merged

xxchan merged 1 commit into
mainfrom
chore/release-0.54.2

Conversation

@xxchan

@xxchan xxchan commented Oct 10, 2026

Copy link
Copy Markdown
Member

Release OAR and CLI 0.54.2. This PR changes only the two package version fields.

Fixed: grok's own follow-up turn counts in usage() (#325, #327)

  • When a background subagent finishes, grok starts a root turn on its own (prompt_id: "subagent-completed-<child>"). It has no session/prompt answer, which is where OAR read the root's ledger, so its spend was missing from usage().total. OAR now adds that turn's turn_completed.usage to the same running total as prompt answers, once per native _meta.eventId; later prompt answers keep it. The original frames stay in the record stream.
  • History is never billed again. grok replays old notifications when a session is opened with session/load. OAR records, on the wire, whether each notification arrived before or after the session-open answer, even when the ACP SDK delivers it later, and counts only those after it that are not marked as a replay. A resumed or loaded session's total starts empty, as before.

Still not counted, now documented: a background subagent's own spend when it finishes after the parent's turn ends. grok includes a child's spend in the parent's prompt ledger only when the child finishes during that prompt, and neither subagent_finished.will_wake, the model's background argument nor the order of the notifications tells OAR which happened (grok can apply the child's usage before it schedules the finished notification on another worker). Grok child ledgers therefore stay native-only and withChildren stays absent for grok, so usage().total can undercount such a child. docs/runtimes/grok.md has the evidence and a repeatable probe (experiments/grok-background-usage-2026-10-10.md).

Behavior changes

  • On grok, usage().total grows when grok runs a follow-up turn after a background subagent, with a usage event on that notification's frame.

Validation: #327 passed all 17 checks on its final head, and its merged tree equals the tree verified locally on top of 0.54.1 (typecheck, lint, full tests). Lookout verified it against real grok 1.0.50 with a mock provider, with no account: background, foreground and resumed sessions, and a shim that forced session/load and renamed grok's replayed history to the live notification name, so replays looked exactly like live reports. No replayed ledger was counted. After this PR passes CI and merges, tag its exact squash commit as v0.54.2 to trigger npm trusted publishing.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@xxchan
xxchan merged commit df5ae8c into main Oct 10, 2026
17 checks passed
@xxchan
xxchan deleted the chore/release-0.54.2 branch October 10, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant