anomalyco / anomalyco/opencode
BUG REPORT: Output Truncation During Long Responses
@kommander is already working on this.
Since Jul 28, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Environment
- Platform: opencode CLI (DeepSeek-v4-flash-free model)
- OS: Windows PowerShell 5.1
- Date: 2026-07-29
Description
When the assistant generates a response that contains a large amount of text content (e.g., writing full chapter text, composing complete setting files, or outputting lengthy analysis), the response is silently truncated before reaching the user. The assistant is not aware of the truncation — from its perspective, the full response has been sent.
Steps to Reproduce
- Ask the assistant to write a long-form narrative (e.g., a novel chapter of 2500+ characters)
- Ask the assistant to compose a complete document with multiple sections
- Observe that only the beginning portion of the response is delivered to the user
Observed Behavior
- Truncation occurs silently — no error message is shown to either the user or the assistant
- The assistant cannot detect that truncation has happened
- The assistant may continue operating under the assumption that the full content was delivered, leading to confusion and redundant work
- The truncation point appears to be content-length dependent, not tool-call-count dependent
Impact
- Core functionality (writing chapter text, composing comprehensive outlines, saving reference documents) is unreliable
- Requires workarounds such as piping content through bash Set-Content to write files directly
- Wastes time due to repeated verification and re-sending
- Creates user frustration when the assistant appears to "forget" or "fail to finish"
Workaround Identified
Using ash tool with Set-Content to write file content bypasses the truncation issue, as the content is passed as a command argument rather than as direct output text. However, this is a workaround, not a fix.
Recommended Fix
Increase or remove the output character limit for assistant responses, or implement a truncation detection mechanism that notifies the assistant when content has been cut off.
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.