Skip to content

fix(server): bound live tool payloads like the settled read - #89

Merged
Tarquinen merged 1 commit into
devfrom
port-toolbounds
Nov 16, 2026
Merged

Tarquinen merged 1 commit into
devfrom
port-toolbounds

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

A running tool's input, output and metadata came off the live stream whole (a megabyte of shell output could sit on the row), then shrank to the REST read's 20,000-character and 100-item limits once the tool finished. The live stream now applies the same limits, so a running tool's row matches what it shows once settled and huge payloads don't sit in memory.

iOS: 72a78460 (the tool part)

Emulator (session-lab, a shell tool streaming 5 MB of output, Java heap after GC): dev grew 23.1 → 41.7 MB, this PR 23.0 → 26.5 MB. The screen is the same on both (the running tool row is collapsed).

Verified: ported liveToolPayloadsAreBoundedLikeTheSettledRead, which fails without the fix; scripts/check.sh :server passes.

Port of the tool part of iOS 72a78460: a tool's live input, output and
metadata reached the transcript whole (a megabyte of shell output on
the row while it ran), then shrank to the REST read's 20 000-character
and 100-item bounds once it settled. The stream now applies the same
bounds (`OpenCodeToolBounds`, shared with the REST decoder), so the
live row matches its settled read and huge payloads don't sit in
state. The offscreen Markdown skip from that commit was already here;
dropping reasoning text is deferred (the payload still decodes it).

Verified: ported OpenCodeEventDecodingTests.liveToolPayloadsAreBoundedLikeTheSettledRead
fails on the old decoder (unbounded output) and passes now;
vm.sh check :server passes; ios-sync.py check reports 0 errors.
@Tarquinen
Tarquinen merged commit 1c53a5e into dev Nov 16, 2026
3 checks passed

This branch was previously deployed

1 inactive deployment
release — 56b5fbe8 Deployed Nov 16, 2026 by Tarquinen via check #309
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