You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Per-project (and per-path) default provider instance for new threads
#32072
Let a project (and optionally a folder path) choose which provider instance (account) new threads default to, so people running the same provider under several accounts don't have to pick the right one by hand every time. The selection is a soft default: it pre-fills the account for new threads in that project, and can still be overridden per thread.
This is the account-level sibling of two per-project overrides that already exist as ideas: per-project GitHub CLI account (#13103) and per-project browser profile (#18004).
What already works today (so this isn't that)
I went looking before filing, because a lot of this space is already built:
Provider instances already let you add several accounts of the same provider (e.g. Claude (work) and Claude (personal), multiple Codex accounts) and pick one per thread at start, and switch mid-thread via the orchestrator (noted in Continue a thread on another account when it hits a usage limitΒ #18949).
Per-project provider on/off already exists: in Settings β Providers with a project selected, a provider's switch turns it on or off for that project only (docs/user/project-settings.md). Default model can also be overridden per project.
So the thread-level and provider-on/off pieces are solved. What's missing is a per-project / per-path default at the instance (account) level.
The gap
Per docs/user/project-settings.md: "Providers and diagnostics are per machine β¦ Every other provider setting stays per machine." The per-project override for providers is the on/off toggle, not which account is the default. So:
A project can say "use Claude here" but not "default new threads here to the work Claude account, not the personal one."
With several accounts of one provider, there is no way to make a folder remember its account. You re-select it for every new thread, and a wrong pick quietly spends the wrong subscription.
For people who keep company work and personal work on one machine, this is a recurring footgun: billing lands on the wrong subscription, and company threads run under a personal account (or vice versa) with no steady separation. The machinery to separate them (provider instances) already exists β there's just no per-project/per-path default pointing at it.
In Settings β Providers with a project selected, alongside the existing on/off switch, add a default account picker per provider that lists that provider's instances. With a project selected it sets a project override; at All projects it edits the environment default, consistent with how model and provider settings already fan out (project-settings.md, the "layers" override chain).
New threads in that project pre-select the chosen instance. Fully overridable in the composer / new-thread flow β soft default, not a lock.
Unavailable state: if the chosen instance is removed or signed out, show it as unavailable and fall back to the environment default (same pattern Per-project GitHub CLI account selectionΒ #13103 asks for GitHub accounts).
Reuses the existing per-project override + layers UI; no new settings surface.
2. Optional path-pattern rules (fallback layer)
So a whole tree of repos doesn't need per-project setup, add directory path rules that resolve to an instance, e.g.:
~/company/** β Claude (work), Codex (company)
~/personal/** β Claude (personal)
A new thread's workspace path is matched against the rules; the most specific match wins. This is a convenience layer under the explicit project override.
If nothing matches, behavior is exactly as today, so this is additive and backwards-compatible.
Non-goals / scope
Not a hard lock. This is a soft default only; it does not block a project from using another account. (A per-project "lock this project to one account" for strict billing/data isolation could be a later, separate addition β called out so the soft-default scope is explicit.)
A per-project default provider instance is the missing member of that set, and it reuses the override/layers machinery that's already in project-settings.md.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
Let a project (and optionally a folder path) choose which provider instance (account) new threads default to, so people running the same provider under several accounts don't have to pick the right one by hand every time. The selection is a soft default: it pre-fills the account for new threads in that project, and can still be overridden per thread.
This is the account-level sibling of two per-project overrides that already exist as ideas: per-project GitHub CLI account (#13103) and per-project browser profile (#18004).
What already works today (so this isn't that)
I went looking before filing, because a lot of this space is already built:
Claude (work)andClaude (personal), multiple Codex accounts) and pick one per thread at start, and switch mid-thread via the orchestrator (noted in Continue a thread on another account when it hits a usage limitΒ #18949).Settings β Providerswith a project selected, a provider's switch turns it on or off for that project only (docs/user/project-settings.md). Default model can also be overridden per project.t3 thread start --provider <instance>can target an instance at creation (CLI: switch an existing thread's provider instance and model (t3 thread send --provider/--model, or t3 thread configure)Β #31822).So the thread-level and provider-on/off pieces are solved. What's missing is a per-project / per-path default at the instance (account) level.
The gap
Per
docs/user/project-settings.md: "Providers and diagnostics are per machine β¦ Every other provider setting stays per machine." The per-project override for providers is the on/off toggle, not which account is the default. So:For people who keep company work and personal work on one machine, this is a recurring footgun: billing lands on the wrong subscription, and company threads run under a personal account (or vice versa) with no steady separation. The machinery to separate them (provider instances) already exists β there's just no per-project/per-path default pointing at it.
Proposal
1. Per-project default provider instance (primary)
In
Settings β Providerswith a project selected, alongside the existing on/off switch, add a default account picker per provider that lists that provider's instances. With a project selected it sets a project override; at All projects it edits the environment default, consistent with how model and provider settings already fan out (project-settings.md, the "layers" override chain).2. Optional path-pattern rules (fallback layer)
So a whole tree of repos doesn't need per-project setup, add directory path rules that resolve to an instance, e.g.:
A new thread's workspace path is matched against the rules; the most specific match wins. This is a convenience layer under the explicit project override.
Resolution order (most specific first)
If nothing matches, behavior is exactly as today, so this is additive and backwards-compatible.
Non-goals / scope
Why it fits the existing design
T3 already has per-project overrides for closely related, account-shaped settings:
A per-project default provider instance is the missing member of that set, and it reuses the override/layers machinery that's already in
project-settings.md.Related
@-mention a provider/instance in the composer to target itAll reactions