anomalyco / anomalyco/opencode

[Bug]: Zen streaming output token-merge corruption on opencode/big-pickle — glued tail fragments, duplicated emission, non-ASCII leakage (2026-09-18)

Open
#49,800 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

Hosted OpenCode Zen streaming output shows token-merge corruption: chunks of the previous/neighboring model output are glued onto unrelated new text (e.g. GPU is freecars, ...Restart the launch sessioncars, ...for linked repositories), occasionally with duplicated emission of the same string inside one part, plus sporadic non-ASCII leakage into the model's reasoning stream. The corruption appears pre-serialization: the bytes are stored verbatim in the message part bodies in the local database (they are not a display-layer glitch).

Environment

  • OpenCode version: 1.18.31
  • OS: Artix Linux (runit, MATE), no systemd, all locally verified clean
  • Provider/model: opencode/big-pickle (OpenCode Zen, hosted; endpoint opencode.ai/zen/v1, OpenAI-compatible)
  • Session ID: ses_f55325c89ffecIgZhZEtQPtuPa
  • Local data store verifies the corruption is stored in the part bodies (SQLite opencode.db), i.e. pre-serialization generation artifact.

Observed corruption events (all times UTC)

Timestamps below are the part created_at values in epoch milliseconds with the UTC ISO-8601 equivalent:

UTC (ISO-8601) Epoch ms Token (truncated) Note
2026-09-18T01:37:07.523Z 1789696027523 licenseders earliest suspicious, low confidence
2026-09-18T02:00:35.525Z 1789696835525 loadingtons first clearly-anomalous (model reasoning text)
2026-09-18T02:05:20.716Z 1789697120716 firsthare confirmed
2026-09-18T02:20:23.570Z 1789698023570 reboothare confirmed
2026-09-18T02:23:14.689Z 1789698194689 immediatelychers + Japanese 訪れ non-ASCII injection in model reasoning
2026-09-18T02:23:52.936Z 1789698232936 contexthen part ends mid-word
2026-09-18T02:28:07.201Z 1789698487201 rightrogate confirmed
2026-09-18T02:32:15.575Z 1789698735575 sessioncars first cars tail

First full cars-tail artifact: part prt_0b2866d5a001d1UsvXd3ReEdRK (2026-09-18T02:19:09.629Z, epoch 1789697949629) contains the same string emitted TWICE in one part body: once clean at offset 0 and again at offset 425 corrupted as GPU is freecars (the word cars was glued onto the tail of a message about the GPU being free).

Other cars tails: Restart the launch sessioncars (02:32), ...for linked repositoriesrepositoriescars (later).

Non-ASCII leakage confirmed inside the model stream (not tool output): Chinese 输出, Arabic ك ل ا, Japanese 訪れ, Chinese 死.

What was excluded (checked, not the cause)

  • Local model files: GGUF sha256 005b0933... PASS; no artifact introduces these strings.
  • Local config/fork trees/proxy logs (duckai/qwen relays): all clean; the corrupt session did not route through them.
  • Tool-output and tool-role bodies: zero occurrences of the corrupt strings — they are generation-side, not injected by tools.
  • User-typed variants near these tokens are false positives: monitoras, reviously (substring of "Previously"), recommendxed, concurent are all user-typed and were excluded.

Expected vs actual

  • Expected: streaming output contains only token sequences consistent with coherent generation (valid words, no glued tail fragments, no foreign-script leakage).
  • Actual: progressively worsening frequency of glued/hallucinated tail fragments beginning ~2026-09-18T01:37Z and clear anomalies from 02:00Z, including one duplicated-emission part, and 4 confirmed non-ASCII injections into the reasoning stream.

Request

  • Please identify whether this points to a serving/stream-assembly regression (e.g. a token-merge or flush bug in the streaming path, or a rollout during 2026-09-18T02:00–02:35Z).
  • Confirm from the echoed request ID on the receiving side; happy to supply the raw part bodies on request.
  • Session data for this incident (ses_f55325c89ffecIgZhZEtQPtuPa) will be archived for one week and will be available upon request.

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.

Research direction

Start with the streaming path and the SQLite message part bodies for session ses_f55325c89ffecIgZhZEtQPtuPa, comparing the recorded corruption with the echoed request ID on the receiving side. Check whether the duplicated emission, glued tail fragments, and non-ASCII leakage indicate a serving or stream-assembly regression during the reported time window; done means identifying the responsible layer or confirming the issue needs hosted-service investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
sqlite
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.