This release adds 2 notable features for engineering teams evaluating rollout.
✓ No known CVEs patched in this version
Topics
+1 more
Summary
AI summaryUpdates Bug Fixes, Tests, and Performance across a mixed release.
Changes in this release
| Type | Severity | Summary | CVE |
|---|---|---|---|
| Feature | Medium |
Pi RPC adapter added as sixth first-class adapter, exposing Pi's JSONL event stream through orchestrator's AgentEvent contract. Pi RPC adapter added as sixth first-class adapter, exposing Pi's JSONL event stream through orchestrator's AgentEvent contract. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Feature | Medium |
Registered in init adapter detection, doctor, agent shop, TUI wizard models (`PI_MODES`), and `EFFORT_ADAPTERS`. Registered in init adapter detection, doctor, agent shop, TUI wizard models (`PI_MODES`), and `EFFORT_ADAPTERS`. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Feature | Medium |
Agents-tab onboarding tip now lists all six adapters; regression test ensures sync with `SUPPORTED_ADAPTERS`. Agents-tab onboarding tip now lists all six adapters; regression test ensures sync with `SUPPORTED_ADAPTERS`. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Feature | Medium |
Supports full provider matrix (OpenRouter, Anthropic, OpenAI Codex, Gemini, etc.) via `--model "<provider>/<model>"` convention. Supports full provider matrix (OpenRouter, Anthropic, OpenAI Codex, Gemini, etc.) via `--model "<provider>/<model>"` convention. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Feature | Medium |
Pi adapter supports full provider matrix using `--model "<provider>/<model>"` convention. Pi adapter supports full provider matrix using `--model "<provider>/<model>"` convention. Source: granite4.1:30b@2026-05-19-audit Confidence: low |
— |
| Performance | Medium |
Optimized `readPiRpcLines` from O(n²) to O(n) using chunks pattern instead of Buffer.concat per chunk. Optimized `readPiRpcLines` from O(n²) to O(n) using chunks pattern instead of Buffer.concat per chunk. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Performance | Medium |
Improved `createStderrTailCapture` by avoiding array shift on overflow, keeping a single backing buffer. Improved `createStderrTailCapture` by avoiding array shift on overflow, keeping a single backing buffer. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Performance | Medium |
Collapsed token alias lookup into a single map with helper, reducing lines and improving lookup speed. Collapsed token alias lookup into a single map with helper, reducing lines and improving lookup speed. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Bugfix | Medium |
Pi stream abort/kill cleanup schedules graceful process termination in finally block. Pi stream abort/kill cleanup schedules graceful process termination in finally block. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Bugfix | Medium |
Unhandled errors before first line are caught and emitted as `error` AgentEvent instead of unhandled rejection. Unhandled errors before first line are caught and emitted as `error` AgentEvent instead of unhandled rejection. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Bugfix | Medium |
Silent stderr is replaced with tail capture retaining last 4 KB, surfacing auth/extension-load failures. Silent stderr is replaced with tail capture retaining last 4 KB, surfacing auth/extension-load failures. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Bugfix | Medium |
Removed dead branch in `extractPassiveUpdate`, simplified return logic and dropped unused ParseState argument. Removed dead branch in `extractPassiveUpdate`, simplified return logic and dropped unused ParseState argument. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Bugfix | Medium |
Changed generic Buffer<ArrayBufferLike> to plain Buffer | null for compatibility with node ^20.17.0. Changed generic Buffer<ArrayBufferLike> to plain Buffer | null for compatibility with node ^20.17.0. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Bugfix | Medium |
Removed `as any` cast in test mock, complying with CLAUDE.md restrictions. Removed `as any` cast in test mock, complying with CLAUDE.md restrictions. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Refactor | Medium |
Extracted ONBOARDING_GOALS, ONBOARDING_TASKS, ONBOARDING_AGENTS from App.tsx to onboarding-config.ts. Extracted ONBOARDING_GOALS, ONBOARDING_TASKS, ONBOARDING_AGENTS from App.tsx to onboarding-config.ts. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Other | Medium |
Added 260 new tests (1694 → 1954) covering adapter contract, event parsing, stderr tail surfacing, abort handling, and TUI integration. Added 260 new tests (1694 → 1954) covering adapter contract, event parsing, stderr tail surfacing, abort handling, and TUI integration. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
Full changelog
New Features
- Pi RPC adapter (#12) — sixth first-class adapter. Wraps
pi --mode rpc(@mariozechner/pi-coding-agent) and exposes its JSONL event stream through the orchestrator'sAgentEventcontract. Supports Pi's full provider matrix (OpenRouter, Anthropic, OpenAI Codex, Gemini, …) via the--model "<provider>/<model>"convention. Registered ininitadapter detection,doctor, agent shop, TUI wizard models (PI_MODELS), andEFFORT_ADAPTERS. Agents-tab onboarding tip now lists all six adapters; a regression test asserts it stays in sync withSUPPORTED_ADAPTERS.
Bug Fixes
- Pi stream: abort/kill cleanup — when the generator exits without a terminal
doneevent (abort signal or stream error) the adapter now schedulesprocessManager.killWithGrace(pid, 1000)from thefinallyblock. The long-lived pi process is no longer pinned alive by dangling'close'/'error'listeners. - Pi stream: unhandled error before first line — the stdout
for awaitis wrapped intry/catch. Stream errors arriving before the first JSONL line (ECONNRESET, EPIPE, immediate crashes) are now classified viaclassifyAdapterErrorand yielded as anerrorAgentEventinstead of escaping as an unhandled rejection. - Pi stream: silent stderr —
proc.stderr.resume()(which drained but dropped data) is replaced bycreateStderrTailCapture(), retaining the last 4 KB of stderr. Auth and extension-load failures now surface in the error message on non-zero exit. - Dead branch in
extractPassiveUpdate— both arms ofstate.finalText ? null : nullreturnednull; simplified to a singlereturn tokens ? { tokens } : null. The unusedParseStateargument is dropped. Buffer<ArrayBufferLike>generic — replaced with plainBuffer | nullso the line reader compiles cleanly on the^20.17.0floor of@types/node(the generic only landed in@types/node22+).as anyin test mock —pi-adapter.test.tscasts the mock child process throughunknown as ChildProcess. CLAUDE.md forbidsas any.
Performance
readPiRpcLines: O(n²) → O(n) — replaced per-chunkBuffer.concat([pending, buf])(which copied the full accumulator each time) with thechunks[] + totalLen + offsetpattern already used byreadLines()inprocess-manager.ts. Concat once per chunk arrival, scan with an offset, subarray the remainder.createStderrTailCapture: drop array-shift on overflow — keeps a single backingBufferand slices viaBuffer.from(buf.subarray(buf.length - LIMIT))when oversized.Buffer.frommaterializes an exactly-sized copy so a single 64 KB stderr burst no longer pins the largerArrayBufferalive until GC.- Token alias lookup collapsed — the eight
??chains forcacheRead/cache_read_input_tokens/etc. became a singlePI_TOKEN_ALIASESmap with onepick(keys)helper. Same wire-compatibility, far fewer lines.
Refactoring
src/tui/onboarding-config.ts— extractedONBOARDING_GOALS,ONBOARDING_TASKS,ONBOARDING_AGENTSout ofApp.tsx. The app and the regression test both import from the new module;App.tsxno longer needs to export internal constants for test access.
Tests
- 260 new tests (1694 → 1954):
test/unit/infrastructure/pi-adapter.test.ts(20 tests) — adapter contract: arg list, prompt JSONL write, parsing of every Pi RPC event type (extension_ui_request,message_update.text_delta,tool_execution_start,tool_execution_endforbash/write/edit, largeagent_end,responsefailure), stderr tail surfacing, abort-signal kill.test/integration/pi-adapter.e2e.test.ts— full lifecycle through the real Orchestrator with a mocked spawn: dispatch → JSONL stream → state machine transitionstodo → in_progress → review → done→ tokens persisted on the Run → process termination viakillWithGrace.test/integration/pi-tui.e2e.test.tsx— same lifecycle through the Ink/React TUI viaink-testing-library: pi agent + adapter chip on the Agents tab, activity feed showstext_delta/tool_call/file_changed/ done.test/unit/tui/onboarding-agents.test.ts— invariant that everySUPPORTED_ADAPTERSentry appears in the Agents-tab onboarding description.- Parametrized rows for
piinagent-factory.test.ts(model resolution + MCP-skill filtering),commands-init.test.ts(getDefaultAgents('pi')), andwizard-effort.test.ts(EFFORT_ADAPTERSmembership).
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About ORCH
CLI orchestrator that manages Claude Code, Codex, and Cursor as a typed task queue with state machine (todo→in_progress→review→done), auto-retry, inter-agent messaging, and TUI dashboard.
Related context
Related tools
Beta — feedback welcome: [email protected]