anomalyco / anomalyco/opencode

Session shell route responses are compressed unlike message and prompt_async

Open
#40,007 0 comments 0 reactions 1 assignee View on GitHub

@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
  1. Start the server (bun dev serve)
  2. POST /session/:sessionID/shell with Accept-Encoding: gzip and a response body over 1024 bytes
  3. Response comes back with content-encoding: gzip; the same request shape against /session/:sessionID/message does not
Screenshot and/or share link

No response

Operating System

macOS

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.