โšกLocal runs may require sudo. Cloud sandbox recommended for isolation.
Troubleshooting2026-02-09

Fix DeepSeek R1 <think> Tag Error in JetBrains / Continue Plugin

Continue plugin shows 'JSON parsing failed' when using DeepSeek R1 in JetBrains IDEs. This is a known thinking tag issue. Here's the fix that works in IntelliJ, PyCharm, and other JetBrains IDEs.

By: LazyDevโ€ข
#JetBrains#Continue#DeepSeek#IDE#JSON#Troubleshooting

Before fixing this error

Many OpenClaw issues are caused by insufficient VRAM or environment mismatch. Running commands blindly may not solve the root cause.

Run 10-Second Preflight Check

Error Confirmation

Error: JSON parsing failed. Unexpected token '<'
Expecting value: line 1 column 1 (char 0)
    at JSON.parse (<anonymous>)
    at ContinueExtension.handleResponse (/extensions/continue/core/handler.js:84)

What You See in JetBrains:

Continue plugin throws an error when DeepSeek R1 responds. The plugin expects clean JSON but receives thinking tags instead.

Full Response (The Problem):

DeepSeek R1 wraps its response in thinking tags before the actual JSON:

<!-- think -->
The user is asking for a JSON response. Let me format it properly...
<!-- /think -->
{"result": "actual data here"}

Scope: Continue's JSON parser fails because it receives <!-- think --> tags at position 0 instead of the expected {. The plugin doesn't strip DeepSeek's thinking tags before parsing JSON.

Error Code: Unexpected token '<' โ€” JSON parser encountered thinking tag markup instead of opening brace.


Affected Environment

ComponentVersionLast Verified
JetBrains IDEsIntelliJ IDEA, PyCharm, WebStorm, CLion2026-02-09
Continue PluginLatest stable2026-02-09
DeepSeek R1All variants (8b, 32b, 70b, distilled)2026-02-09
OllamaLatest2026-02-09

Note: This issue affects ALL JetBrains IDEs using Continue plugin with DeepSeek R1. The root cause is DeepSeek's thinking tags, not a bug in Continue or JetBrains.


3-Minute Sanity Check

Run these commands to confirm the issue:

# 1. Is DeepSeek R1 running?
ollama list | grep deepseek-r1
# Expected: deepseek-r1:latest (or variant)

# 2. Test raw JSON output (should show thinking tags)
ollama run deepseek-r1:latest 'Output JSON: {"status": "ok"}' | head -5
# Expected: You will see <!-- think --> tags before the JSON

# 3. Check Continue plugin is configured for JSON mode
# In JetBrains: File โ†’ Settings โ†’ Languages & Frameworks โ†’ AI โ†’ Continue
# Look for "Response format" or "JSON mode" setting

If step 2 shows NO thinking tags: Your issue may not be DeepSeek thinking tags. Check for other JSON formatting issues.


Decision Gate

:::decision-gate

Stop guessing. See the red lines.

Choose Manual Fix only if:

  • You enjoy editing configuration files for each JetBrains IDE
  • You have multiple development machines to maintain
  • You're comfortable updating configs on each Continue plugin update
  • You haven't spent more than 30 minutes on this

Choose Automated Fix if:

  • You want to know whether continuing is worth it
  • You value your time more than $9.90
  • You want documented stop conditions before burning more time :::

Fork in the Road

Option A: Manual Fix (High Maintenance)

What you'll do:

  • Edit Continue plugin's ai.json configuration manually
  • Add system prompt override to disable DeepSeek thinking tags
  • Repeat for each JetBrains IDE (IntelliJ, PyCharm, WebStorm, etc.)
  • Re-apply fix every time Continue plugin updates

Time investment: 20-30 minutes initially, then 5-10 minutes per update

Risks:

  • Config gets wiped on plugin update
  • Different JetBrains IDEs store config in different locations
  • Easy to forget which settings you changed
  • No centralized management

Steps:

  1. Open JetBrains IDE
  2. Go to File โ†’ Settings โ†’ Languages & Frameworks โ†’ AI โ†’ Continue
  3. Find "System Prompt" or "Custom Instructions"
  4. Add: "You are a JSON-only API. Output ONLY JSON. Do NOT use tags."
  5. Restart IDE
  6. Test with a simple JSON request

Verdict: High maintenance. You will repeat this every time Continue updates.

Option B: Decision Pack (Stop Rules & Red Lines)

What you get:

  • Verified red-line rules for JetBrains + DeepSeek R1 (because fixing JSON tags won't save you from a VRAM crash 5 minutes later)
  • Known-safe configuration boundaries (what NOT to change)
  • Clear stop conditions before you burn more time
  • A documented exit path when local setup stops making sense

Time investment: 2 minutes to read

This does not patch your IDE. It does not automate fixes. It tells you when continuing is irrational.


Primary CTA


Manual Guide (SEO)

:::div{.border-l-4 border-blue-500 .glass-card .p-6 .mb-8}

The manual path is intentionally high-maintenance. Exact boundaries and known-safe rules are documented in the Survival Kit.

If you prefer manual editing:

  1. Locate Continue plugin config โ€” Path varies by JetBrains IDE
  2. Override system prompt โ€” Add instruction to suppress thinking tags
  3. Repeat after plugin updates โ€” Config may be reset on update

:::


Why NOT Other Options

OptionRejection Reason
Switch to a different LLMDeepSeek R1 is one of the best local models. Switching avoids the problem rather than fixing it.
Edit Continue plugin source codeRequires rebuilding the plugin from source. Breaks on every update.
Disable Continue plugin entirelyLoses the convenience of AI assistant in your IDE. Manual copy-pasting is slower.
Use web-based DeepSeekNo local context of your codebase. Privacy concerns. Requires internet connection.
Wait for Continue plugin updateThinking tags are part of DeepSeek's architecture. No timeline for a fix.

Summary

CheckCommandPass Criteria
DeepSeek R1 installedollama list | grep deepseek-r1Shows deepseek-r1:latest or variant
Thinking tags presentollama run deepseek-r1:latest 'Output JSON' | head -5Shows <!-- think --> tags
Continue plugin configuredCheck IDE settings for Continue configContinue is enabled and configured

Decision:

  • Want decision clarity instead of config wrestling? Buy Clarity โ€” $9.90
  • Enjoy manual config editing? Follow the Manual Guide above


JetBrains / Cursor users: Local R1 failures usually happen before inference. The red lines are documented inside the Survival Kit.


Bookmark this site

New fixes are added as soon as they appear on GitHub Issues.

Browse Error Index โ†’

Still want local? Continue debugging โ†’

Still stuck?