anomalyco / anomalyco/opencode
[Model] deepseek-v4-flash repeatedly emits the meaningless token "curd" in long tool-calling sessions (Claude Code CLI + Go plan)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Description
Setup / Environment
- Frontend: Claude Code CLI v2.1.237 (NOT the OpenCode TUI) — so OpenCode
/shareis unavailable and no share link can be provided from here. - Model access: deepseek-v4-flash via the OpenCode Go plan (subscription-based model access). Observed on 2026-08-20.
- OS: Windows 11; Terminal: Windows Terminal (PowerShell + Git Bash).
What happened
In long, high-context turns (documentation edits, test runs, git stage/commit/push), the model repeatedly emits the token curd after its normal reasoning text and before the intended tool call. Runs range from a single curd to thousands of consecutive repeats. It requires a manual interrupt to stop.
Measured evidence (extracted from the session transcript, all from assistant output of deepseek-v4-flash):
| Metric | Value |
|---|---|
| Assistant messages affected | 26 |
Total curd tokens emitted |
8,298 |
| Single-message peak | 3,886 (second peak: 3,299) |
Messages with ≥100 curd |
6 |
Messages with ≥1,000 curd |
2 |
| First → last occurrence | 2026-08-20 04:18 → 13:32 UTC (~9 h) |
| Per-message distribution | median 5 / mean 319 |
Transcript excerpts (verbatim, from the raw session log; all from assistant output, model deepseek-v4-flash; [before]→[curd]→[after] shows where the burst lands):
① small burst (1 token) — docs/test-edit turn
[before] Let me update the ToolAccessGuardTest for the refined non-blocking dept behavior:
[curd] curd
[after] (end of message)
② medium burst (6 tokens) — test-run turn
[before] Let me run the tool-service test explicitly and capture the tail output.
[curd] curdcurdcurdcurdcurdcurd
③ repeating bursts mid-message (27 tokens) — build-diagnose turn
[before] Let me run without the grep filter to see what happened.
[curd] curdcurdcurdcurdcurdcurdcurdcurdcurd...
[after] Let me run the build capturing full output. curdcurd curdcurdcurdcurd Let me run...
④ peak burst (3,886 tokens) — docs-update turn
[before] Now update the architecture README to note P3c.
[curd] curd\n\nLet me update the architecture REA[curd][curd]...(3,886 in a row, then the real text resumes)
Pattern observed
- Always: normal reasoning → burst of
curd→ actual tool call. - Correlates with long context + chained multi-step tool calls (docs update, test runs, git commit/push). Absent on short single-turn replies.
- Same single token repeated with no variation — characteristic of a generation-side repetition / decoding loop, not a frontend rendering issue.
- Repeats even mid-message: the model emits
curd, then a real sentence, thencurdagain (see excerpt ③).
Request
Please route this to the upstream model provider (DeepSeek). Happy to attach the raw transcript excerpt if useful.
Plugins
No response
OpenCode version
No response
Steps to reproduce
- Use Claude Code CLI (v2.1.237) pointed at the OpenCode Go plan (deepseek-v4-flash)
- Start a long, high-context task with chained tool calls (multi-file doc edits, test runs, git stage/commit/push)
- After normal reasoning text and before a tool call, the model streams "curd" (single to thousands of repeats)
- Short single-turn tasks do not trigger it — needs long context
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal (PowerShell 5.1 + Git Bash)
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
No repository file, entry point, or test is identified; start by reviewing the raw session transcript and confirming the behavior with the stated Claude Code CLI, OpenCode Go plan, and deepseek-v4-flash setup. Done means the repeated token emission is reproduced and resolved or confirmed as an upstream DeepSeek issue, with the result routed to the model provider.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, cli
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100