Skip to content

docs: tool use & subagent guide for DeepSeek sessions#1

Open
MitchellkellerLG wants to merge 6 commits into
MG-Cafe:mainfrom
LeadGrowGTM:feat/tool-use-subagent-guide
Open

docs: tool use & subagent guide for DeepSeek sessions#1
MitchellkellerLG wants to merge 6 commits into
MG-Cafe:mainfrom
LeadGrowGTM:feat/tool-use-subagent-guide

Conversation

@MitchellkellerLG
Copy link
Copy Markdown

Summary

  • Adds docs/TOOL-USE-GUIDE.md — comprehensive guide to tool use capabilities, limitations, and workarounds when routing Claude Code through DeepSeek
  • Updates README with tool use section and link to new guide
  • Updates SUBAGENT-MAPPING.md with tool use limitations and agent pinning recommendations

Key findings documented

  • Thinking block round-trip (critical): DeepSeek requires thinking content blocks passed back in multi-turn tool conversations — Claude Code likely strips these, causing HTTP 400 errors that kill subagent tool loops
  • is_error ignored: Tool failures not signaled to model — workaround: prefix error content with ERROR:
  • disable_parallel_tool_use ignored: Model decides independently
  • No multimodal support: Agents using screenshots/documents must be pinned to Anthropic
  • No prompt caching: All cache_control fields ignored

Test plan

  • Verify basic tool use works on a ds-pro session (Read, Write, Bash)
  • Test subagent spawning with thinking mode disabled
  • Test agent pinning (empty ANTHROPIC_BASE_URL env override)
  • Confirm HTTP 400 error on multi-turn tool loop with thinking blocks stripped

🤖 Generated with Claude Code

Mitchell Keller and others added 6 commits April 30, 2026 09:46
- SUBAGENT-MAPPING.md: env var inheritance, model tier mapping,
  usage throttle, session launch reference, agent pinning
- POWERSHELL-SETUP.md: full Windows setup with throttle-aware functions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add quick launch section with ds-pro/ds-flash/cs commands
- Link to POWERSHELL-SETUP.md and SUBAGENT-MAPPING.md
- Fix incorrect note: deepseek-v4-pro/flash model names DO work directly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
deepseek-v4-pro/flash fail in interactive mode — Claude Code validates
model names client-side. Use claude-opus-4-6 and claude-haiku-4-5-20251001;
DeepSeek maps these server-side to v4-pro/flash respectively.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents what works and what breaks when using Claude Code tool use
through DeepSeek's Anthropic-compatible endpoint. Critical finding:
thinking blocks must be round-tripped in multi-turn tool conversations
or subagent spawning fails with HTTP 400.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
DeepSeek V4 doesn't natively use Claude Code's Agent tool — it handles
basic tools (Read, Write, Bash, Grep) fine but won't spawn subagents.
Fix: inject a system prompt via --append-system-prompt-file that teaches
the model when and how to use the Agent tool.

- Add config/agent-boost-prompt.md with Agent tool usage patterns
- Update PowerShell launchers to auto-inject when file exists
- Add setup step 3 for copying the prompt file
- Update README with the actual fix (prompting, not API compat)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant