Skip to content

Cursor: tool calls come back as plain text, so Claude Code turns end after one reply #166

Closed

Description

@jenspalmqvist

Summary

On the Cursor provider, the model's tool calls reach Claude Code as text, not as tool_use
blocks. Claude Code sees no tool call, so every turn that needs a tool ends after one reply.
Plain text replies still work.

Versions

  • claude-code-proxy 0.1.42 (Homebrew, macOS arm64)
  • Claude Code 2.1.280
  • Cursor Agent CLI 2026.09.18-9a7762b

Reproduce

  1. claude-code-proxy serve

  2. Run Claude Code against the proxy with a Cursor model and a task that needs tools:

    ANTHROPIC_BASE_URL=http://127.0.0.1:18765 ANTHROPIC_AUTH_TOKEN=unused \
    CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK=1 \
    claude -p "Create roman.py with to_roman(n), then run: python3 -c 'import roman'" \
      --model cursor:grok-4.7-fast --output-format stream-json --verbose \
      --allowedTools "Read,Write,Bash(python3 *)"

Expected

An assistant message with a tool_use block (for example Write), then a tool result and
further turns.

Actual

An empty thinking block, then one text block, and the run ends after one turn
(num_turns: 1). No file is written. The tool-call IDs are appended to the text:

I will add `roman.py` with `to_roman(n)`, then run the import check you asked for.call-2028fbe2-0bc1-4647-bacd-31f407fccda9-0
fc_d927622e-c4…

Observations

  • Seen on cursor:grok-4.7-fast (3 of 3 runs) and cursor:grok-4.6-fast (1 of 1 run).
  • Not caused by anything between Claude Code and the proxy: the result is the same when
    Claude Code talks to the proxy directly.
  • Trivial no-tool requests with 20 tool definitions attached still succeed on
    cursor:grok-4.7, cursor:grok-4.7-fast, cursor:grok-4.6-fast and
    cursor:composer-2.5 (39 of 40).
  • The same task through the proxy on grok-4.7 (direct Grok provider) and gpt-6-sol
    (Codex) uses tools normally and completes.
  • I have not bisected proxy versions. The previous proxy process that ran on this machine
    was a build from before 2026-09-14.
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