Published: 2026-06-03

Run Hundreds of Free Claude Code Agents Using a Local Model via Cowork 3P

Bart Slodyczka demonstrates running hundreds of Claude Code agents completely free by using Co-work on 3P — Anthropic's officially supported feature that lets you plug your own AI backend into Claude Code. The demo runs a multi-agent deep research task with six parallel agents, all powered by a local Gemma 4 E2B model served through LM Studio at zero API cost.

Source video

"Spin up 100's of agents for free in claude code" by Bart SlodyczkaWatch on YouTube →

Key Takeaways

  • Co-work on 3P is an officially supported Anthropic feature — not a hack. It allows any local or third-party model to serve as the backend for Claude Code and the Claude desktop app.
  • The setup requires the Claude desktop app, not just the CLI; developer mode must be enabled first via Help → Troubleshooting.
  • The critical step is renaming your model in LM Studio to match a Claude-compatible identifier (e.g. claude-opus-4.8) — Claude Code uses this to detect supported models.
  • No Anthropic API key is needed for this setup; you provide a placeholder value for the static API key field.
  • Real model used in the demo: Gemma 4 E2B running locally; cost per session = $0 regardless of how many agents run in parallel.

Setup Steps

  1. Download the Claude desktop app — required (the CLI alone does not have the 3P settings UI).
  2. Enable developer mode — Go to Help → Troubleshooting → Enable developer mode. A new "Developer" section appears in settings.
  3. Open Configure third-party inference — In the Developer settings, click "Configure third-party inference".
  4. Set connection type to Gateway — Required for local model endpoints.
  5. Set credential type to Static API key — Enter any placeholder value; no real key needed for local models.
  6. Paste your LM Studio URL — Get this from LM Studio's server settings (typically http://localhost:1234/v1).
  7. Set auth to bearer — Leave as default.
  8. In LM Studio: rename the model — Change the loaded model's display name to claude-opus-4.8 (or another Claude-compatible name) so Claude recognizes it.
  9. Load the model in LM Studio — Click Load Model, select your model, set max tokens, and load.
  10. Verify model discovery — Apply changes; Claude should detect "1 model found".

Commands & Code Mentioned

# LM Studio server URL (paste into Claude desktop third-party inference config)
http://localhost:1234/v1

# Model identifier to set in LM Studio (must match Claude naming)
claude-opus-4.8

# After setup, Claude Code desktop app shows local models in model picker
# No CLI commands needed — configured entirely through the desktop app UI

Related Guides