Docs v0.9.107

CLI Providers Overview

A CLI provider is a vendor-built command-line agent that TatsuCode launches as a child process. The CLI brings its own model auth, its own tool set, and its own internal loop. TatsuCode hands it a task, watches its streaming output, and renders progress.

This is a different shape of provider than the API/subscription providers most of TatsuCode's models use. CLI providers are best for delegating self-contained tasks and getting a structured deliverable back — and they let you reuse subscription plans without ever pasting tokens into TatsuCode.

Currently supported: Claude Code (Claude Pro / Max / Team / Enterprise). On the roadmap: Gemini CLI is the next planned entry. The schema, manifest builder, and stdin safety net are already provider-neutral.

How a CLI Provider Works

When you select a CLI-backed model, TatsuCode:

  1. Spawns the vendor's CLI as a child process for each turn
  2. Pipes your prompt to the CLI (and optionally a manifest from a prior run for handoff)
  3. Parses the CLI's streaming output and renders it in chat
  4. Captures the CLI's final report and archives it as a durable artifact

The CLI itself decides which tools to run — its own native Read/Edit/Bash, plus the TatsuCode tools we expose to it via MCP. TatsuCode never sees the CLI's auth tokens.


Cross-Agent Relay

Every CLI provider run is archived as a report.md so any other CLI agent can read it. This is Cross-Agent Relay — chain agents across vendors, with each handoff producing a durable artifact.

Typical flow:

  1. Run Claude Code on a self-contained chunk of work — gets archived as cli-providers/claude-code/<runId>/report.md.
  2. Continue from that artifact in a different CLI (or back into your main chat) using continueFrom.
  3. The next agent picks up with the prior report as context.

The relay manifest preserves:

  • Files touched in the prior run
  • The CLI's final report
  • Conversation history relevant to the handoff

You stay in charge; each agent does what it's best at.


Oversized-Prompt stdin Routing

Very long prompts (large file pastes, big diffs, full PDFs in context) sometimes exceed what a CLI's command-line argument can carry. TatsuCode automatically routes oversized prompts through the CLI's stdin instead, so prompts that would otherwise truncate or fail just work. You don't need to think about it — the safety net is provider-neutral and on by default.


What CLI Providers Cannot Do

A few things are intentionally not supported:

  • Cannot be assigned as Task Agents. The Task Agent system relies on a TatsuCode-internal tool whitelist (e.g., a read-only Code Explorer). A CLI provider ignores that whitelist and uses its own native tools — assigning one to a Task Agent slot would silently produce something quite different from what you asked for. They're hidden in the /models-taskagents picker and rejected at runtime if a stale config tries.
  • Cannot run in parallel today. One CLI run at a time. Parallel CLI execution is on the roadmap.
  • Token accounting is best-effort. Subscription auth means per-call cost isn't reported back. /usage shows token estimates rather than precise dollar amounts for CLI-backed turns.
  • Context management is owned by the CLI. TatsuCode's auto-compact at 95% applies to API-driven conversations; the CLI manages its own context window during a run.

If you want a CLI provider to do focused exploration without making it a Task Agent, just ask your main chat model to delegate to it ("use Claude Agent to…", "have Claude Code investigate…"). The main model invokes the ClaudeAgent tool on your behalf — same delegation, full archive, no whitelist mismatch.

See CLI vs API/Subscription Providers for the full feature support matrix.


When to Use a CLI Provider

Use a CLI provider when…

  • You want to delegate a self-contained task and get a structured deliverable back.
  • You want to chain agents across vendors on the same project, with each handoff archived.
  • You want to use a subscription you already pay for (e.g., Claude Pro / Max) without pasting tokens into TatsuCode.
  • You want vendor-native tool use — Claude's own Read/Edit/Bash rather than TatsuCode's wrappers — for a specific job.

Use an API / subscription provider when you want a normal conversational model, parallel Task Agents, exact cost accounting, or TatsuCode's tool whitelist enforcement.

The two compose well: have your main API model orchestrate, call a CLI provider for a focused chunk, then continue from the resulting report.md in a different agent.


Next Steps

Type to search documentation

Use to navigate, Enter to select