Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Load an ACP session whose history sends an
agent_message_chunkfor messagea1with texthi. - Send a separate chunk for
a1containing a single space, then another containingthere. - Read the adapter's public
readThreadSnapshotresult. The same problem occurs with standalone newline chunks or a leading tab followed by code.
The existing replays history in order, with stable earlier snapshots test can reproduce this by replacing its " there" chunk with separate " " and "there" chunks. Run:
pnpm exec vp test run apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts -t 'replays history in order'Expected behavior
The snapshot preserves the original text, including hi there, blank lines and code indentation, regardless of ACP chunk boundaries.
Actual behavior
The snapshot contains hithere. Standalone whitespace chunks are dropped before history assembly because the idle/replay ingestion path checks text.trim().length > 0. This affects user, assistant and thought chunks on that path. Actual prevalence among providers is unmeasured.
Impact
Minor bug or occasional failure
Version or commit
main @ 399ea10
Environment
Linux, ACP adapter with the repository's mock ACP agent. Reproduced through the public adapter snapshot interface without a paid provider turn.
Logs or stack traces
Expected: assistant:hi there
Actual: assistant:hithere
Screenshots, recordings, or supporting files
Found during the Pi and ACP Improvements hunt. An independent Claude Opus 5.5 verifier confirmed the baseline passes and the whitespace repro fails for the stated reason.
Workaround
None confirmed. Providers that combine whitespace with adjacent non-whitespace text avoid this particular loss.
Activity