fix(acp): cursor resume bricked by 16MiB ACP wire-message cap
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Cursor ACP resume fails permanently once a session emits a single JSON-RPC line over 16 MiB.
Repro: a thread whose cursor session stored large tool results (in our case two ~30MB StrReplace results embedding the cursor-agent bundle diff, store.db 93MB + 31MB WAL). Every retry fails before the prompt, at session/set_config_option during startSession and at session/prompt during sendTurn:
ProviderAdapterRequestError (cursor) for session/set_config_option: ACP protocol operation 'decode-wire-message' failed caused by MaxBufferSizeExceeded: RPC serialization buffer exceeded the maximum size of 16777216.
Root: packages/effect-acp/src/protocol.ts uses RpcSerialization.ndJsonRpc() with the Effect default (16 * 1024 * 1024). Reinstalling/fixing the cursor CLI does not help because the history persists in ~/.cursor/acp-sessions/<sessionId>/store.db and is replayed on every resume, so the thread is unrecoverable without detaching resumeCursor.
Expected: raise the ACP ndjson framing cap (e.g. 64MiB) so large but legitimate agent payloads resume instead of bricking the thread.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/effect-acp/src/protocol.ts and inspect the RpcSerialization.ndJsonRpc configuration and its 16 MiB default. Reproduce the ACP resume path with a payload larger than 16 MiB, then verify that sessions containing large stored tool results can pass session/set_config_option and session/prompt without decode-wire-message failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100