Skip to content

Repository files navigation

T3 Harness

A VS Code extension that does what T3 Code does, but as a Cursor-style sidebar inside the editor. It doesn't replace the agent CLIs on your machine. It spawns them, and per-provider adapters translate each CLI's native event stream into one common event set the chat UI renders.

Providers

Bring your own subscriptions. Install and authenticate at least one CLI:

Provider Executable Login Wire protocol used
Claude Code claude claude auth login -p --output-format stream-json (JSONL)
Codex codex codex login codex exec --json (JSONL)
Cursor Agent cursor-agent agent login -p --output-format stream-json (JSONL)
OpenCode opencode opencode auth login opencode run (plain text stream)

The provider picker in the composer greys out anything not found on PATH.

Running it

bun install
bun run build

Then press F5 in VS Code (launch config included) and open the T3 Harness icon in the activity bar of the Extension Development Host.

How it works

  • src/harness/types.ts defines the common event set: session, text, reasoning, tool-start, tool-end, done, error.
  • src/harness/adapters/* is one adapter per provider. Each knows its CLI flags and how to turn its native JSONL (or raw text) into common events. Adding a harness means adding one file here and registering it in registry.ts.
  • src/harness/runner.ts spawns the CLI in the workspace folder, writes the prompt to stdin (no shell quoting), splits stdout into lines, and feeds the adapter's parser.
  • Follow-up messages resume the same agent session (--resume for Claude and Cursor, codex exec resume, --continue for OpenCode). "New Chat" clears the session ids.
  • src/chatView.ts + src/webview/ render the Cursor-style chat: streamed markdown, collapsible tool rows with live status, reasoning blocks, token/cost footer.

Settings

Open T3 Harness: Settings from the gear on the view title, or from the command palette. The page matches T3 Code's provider settings:

  • General: default provider, auto-accept edits.
  • Providers: enable/disable each CLI, binary path, launch arguments, Claude CLAUDE_CONFIG_DIR, Codex CODEX_HOME / shadow home, Cursor API endpoint, and per-provider environment variables.

The same values live in VS Code settings as t3harness.autoApprove, t3harness.defaultProvider, and t3harness.providers.

Raw CLI stderr and unparsed lines land in the "T3 Harness" output channel for debugging.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages