Skip to content

chore: release v0.46.0 - #269

Merged
xxchan merged 1 commit into
mainfrom
release/v0.46.0
Oct 9, 2026
Merged

xxchan merged 1 commit into
mainfrom
release/v0.46.0

Conversation

@xxchan

@xxchan xxchan commented Oct 9, 2026

Copy link
Copy Markdown
Member

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

Added: Session.contextBreakdown() (#264, closes #262)

  • What fills the context window, by the runtime's own categories, read on demand and never recorded: { tokens, contextWindow, categories: [{ name, tokens, kind, items? }] }. kind is used | deferred | reserved | free | unknown; names stay the runtime's words.
  • claude only (get_context_usage, detail: "full"): System prompt, System tools, MCP tools, Memory files, Skills, Custom agents, Messages, Autocompact buffer, Free space, with memory files, skills, agents and MCP tools itemized. Every other session has no contextBreakdown member; show contextUsage() there.
  • Each read makes claude send the provider a batch of count_tokens requests (16 to 28 for a small setup), so read when the user asks, never poll. Null from the start of a dispose and after the exit.

Added: a request the runtime withdrew leaves pendingRequests (#266, closes #263)

  • New event app_request_cancelled { requestId }, read off claude control_cancel_request (claude cancels a pending MCP elicitation when the turn is interrupted) and codex serverRequest/resolved. SessionView drops the request from pendingRequests and marks its app_request part cancelled: true.
  • appRequestText(type, body) beside appRequestKind: what a question asks, or the tool or command an approval is for, read off the native body; undefined where OAR does not know.

Behavior changes

  • RuntimeEventBody has a new kind, app_request_cancelled: an exhaustive switch over event kinds needs a case for it.
  • The app_request view part now carries the native body (it was declared but never filled).
  • The root process exit now empties pendingRequests; the parts stay as they were.
  • LineProcess.write drops writes once kill() has ended stdin, and stdin gets an error listener, so a write racing a dying child (the abort fallback's kill) no longer crashes the host with ERR_STREAM_WRITE_AFTER_END or EPIPE.

Validation: all 13 checks passed on #264's final head (2fa106c) and #266's final head (270bc8c); each merged tree equals its CI tree. Lookout inspected both against claude 2.1.292 and codex 0.160.1. After this PR passes CI and merges, tag its exact squash commit as v0.46.0 to trigger npm trusted publishing.

🤖 Generated with Claude Code

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

Labels

None yet

Projects

None yet

1 participant