deepseek-as-subagent
English · 简体中文
Run DeepSeek — or your own OpenAI-compatible local model — as a real sub-agent inside Claude Code / Codex CLI. The host agent keeps the main conversation, planning, judgment, and verification. The selected model gets its own agent loop for execution-heavy work. Coding APIs use workspace-scoped writes and bounded trusted-host Bash; separate read-only APIs provide pure file analysis without command execution.
Full coding delegation
Claude / Codex (main agent)
├─ ordinary coding → delegate_to_deepseek
└─ coding task whose direction may change
→ start_deepseek → job_id
├─ send_deepseek_message(job_id, ...)
├─ get_deepseek_status(job_id)
├─ cancel_deepseek(job_id)
└─ get_deepseek_result(job_id)
▼
Configured-model coding sub-agent
│ Read / Write / Edit / Bash / Glob / Grep / NotebookEdit
│ autonomously reads, modifies, runs, and tests in the workspace
▼
Result returns to the host
Host verifies representative changes / testsCoding Bash runs on the trusted host with cwd=workspace; it is bounded and
credential-isolated, but it is not an OS sandbox.






