Skip to content

[Model] deepseek-v4-flash repeatedly emits the meaningless token "curd" in long tool-calling sessions (Claude Code CLI + Go plan) #43638

Closed as not planned

Description

@xiaowu0203

Description

Setup / Environment

  • Frontend: Claude Code CLI v2.1.237 (NOT the OpenCode TUI) — so OpenCode /share is 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, then curd again (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

  1. Use Claude Code CLI (v2.1.237) pointed at the OpenCode Go plan (deepseek-v4-flash)
  2. Start a long, high-context task with chained tool calls (multi-file doc edits, test runs, git stage/commit/push)
  3. After normal reasoning text and before a tool call, the model streams "curd" (single to thousands of repeats)
  4. 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)

Activity

  1. github-actions commented on Aug 20, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. prathamesh-gharat commented on Oct 18, 2026

    @prathamesh-gharat

    I had this issue several times to the point the entire opencode CLI stopped responding for more than 10 minutes when I tried to load the session after several restarts, disk usage was negligible, memory usage was negligible, cpu usage was between 5-13% for the opencode nodejs process.

    I suspected it was due to the large "Let me run.\n\n" output.

    I ended up using the following script to clean it up in the latest version of opencode that uses the "session_message" table.

    Have to replace your YOUR_SESSION_ID in two places below. Best to create a backup copy of your %USERPROFILE%\.local\share\opencode\opencode.db and %USERPROFILE%\.local\share\opencode\opencode.db-wal before proceeding.

    WITH RECURSIVE fixed(id, txt) AS (
        SELECT id, data
        FROM session_message
        WHERE session_id = 'YOUR_SESSION_ID'
          AND instr(data, '\n\nLet me run.\n\nLet me run.') > 0
    
        UNION ALL
    
        SELECT id,
               replace(
                   txt,
                   '\n\nLet me run.\n\nLet me run.',
                   '\n\nLet me run.'
               )
        FROM fixed
        WHERE instr(txt, '\n\nLet me run.\n\nLet me run.') > 0
    )
    UPDATE session_message
    SET data = (
        SELECT txt
        FROM fixed
        WHERE fixed.id = session_message.id
          AND instr(txt, '\n\nLet me run.\n\nLet me run.') = 0
    )
    WHERE session_id = 'YOUR_SESSION_ID'
      AND instr(data, '\n\nLet me run.\n\nLet me run.') > 0;
    
  3. neriousy commented on Oct 21, 2026

    @neriousy
    Member

    Thanks for the report. This is about how the model itself behaves when served through OpenCode Go (repeating itself, broken tool calls, speed, or rejecting large requests), not a bug in the OpenCode app. We pass these reports to our upstream providers. Starting a new session or running /compact usually helps with loops and oversized-request errors. Closing this to keep the tracker focused; the main discussion is in #50206.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions