pingdotgg / pingdotgg/t3code

Claude driver: explicit model slug bypasses ANTHROPIC_DEFAULT_* mapping; worktree mode not honored (sessions run in live checkout)

Open
#4,149 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Found while evaluating T3 Code (Alpha 0.0.28, macOS) with a Claude provider pointed at
OpenRouter per the docs (docs/providers/claude.md, "I Want To Use OpenRouter").
Three related issues:

1. Model picker stores explicit slugs, so ANTHROPIC_DEFAULT_*_MODEL mapping never applies

The docs suggest mapping Claude Code's model roles via env vars
(ANTHROPIC_DEFAULT_SONNET_MODEL=moonshotai/kimi-k3 etc.). However, the picker persists an
explicit versioned slug — state.sqlite modelSelection shows e.g.
{"model":"claude-sonnet-4-6", ...} — which Claude Code passes through verbatim. The
DEFAULT_* vars only map aliases (sonnet), so the mapping silently never fires: our
"Kimi" provider ran a real claude-sonnet-4.6 via OpenRouter ($ on the wrong model, easy to
miss). Interestingly CLAUDE_CODE_SUBAGENT_MODEL did apply — subagent calls went to Kimi
while the main thread ran Sonnet, which makes the mixed billing extra confusing.

Workaround we found: typing the full slug (moonshotai/kimi-k3) into the model-picker
search creates a custom entry that is passed through correctly.

Suggestion: either resolve picker selections through the provider's env mapping, or update
the OpenRouter docs section to recommend custom-slug entries instead of ANTHROPIC_DEFAULT_*.

2. "Local checkout" default writes into the live repo

Expected for the mode, but as a default it surprises: our first thread modified the real
working tree (untracked files in the user's main checkout). Consider defaulting new threads
to worktree mode, or a first-run hint.

3. Worktree mode selected but not honored

With New worktree explicitly selected (branching from a chosen ref), T3 created the
worktree (~/.t3/worktrees/<repo>/t3code-<id> on the right base) — but the Claude session
still launched with cwd = the project's live checkout (provider_session_runtime shows
"cwd": "<live repo path>"). The worktree stayed empty; all edits landed in the live repo
again. Reproduced on Alpha 0.0.28 with the Claude driver.

Happy to provide state.sqlite excerpts or logs. Thanks — the UI itself is genuinely nice.

🤖 Generated with Claude Code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the model picker, docs/providers/claude.md, and the provider_session_runtime entry point, reproducing the explicit model mapping and selected-worktree cases described for Alpha 0.0.28. Done means mapped model aliases behave as documented, the selected worktree is used as the Claude session cwd, and local-checkout behavior is addressed or clearly surfaced to users.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.