anomalyco / anomalyco/opencode
Session shell route responses are compressed unlike message and prompt_async
Open
@rekram1-node is already working on this.
Since Aug 1, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
POST /session/:sessionID/shell returns a buffered JSON body just like its sibling routes message and prompt_async, but it is missing from STREAMING_POST_REGEX in packages/opencode/src/server/routes/instance/httpapi/middleware/compression.ts:
const STREAMING_POST_REGEX = /^\/session\/[^/]+\/(?:message|prompt_async)$/
So shell responses get gzip/deflate compressed while message and prompt_async responses are exempt. Adding shell to the alternation makes the three buffered session POST routes behave consistently. I have a one-line PR ready.
Plugins
No response
OpenCode version
dev (19231fc)
Steps to reproduce
- Start the server (
bun dev serve) POST /session/:sessionID/shellwithAccept-Encoding: gzipand a response body over 1024 bytes- Response comes back with
content-encoding: gzip; the same request shape against/session/:sessionID/messagedoes not
Screenshot and/or share link
No response
Operating System
macOS
Terminal
No response
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.
Assessment
This issue has not been assessed yet.