Repository navigation
feat(projects): per-project defaults for new threads (#1501 G2) - #1503
Conversation
Projects can carry threadDefaults (provider, model, reasoning effort, permission mode, and an opt-in "last used" mode). createThread applies them below explicit input and above the global settings default. Agent profiles, worker pools and automations still win: forks, imports, automations and memory passes skip project defaults outright. An unknown or uninstalled provider falls back to the global default. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Provider, model, effort and permission pickers plus "Follow last used" in the Edit Project modal, with a note when the chosen provider is not installed. The section is only sent when touched, so a name-only save cannot overwrite a last-used update. New threads no longer inherit the selected thread's provider when the project has its own default. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…1501) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f8e03d745
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function providerInstalledFor(project, id) { | ||
| if (project && project.remoteHost) return true; | ||
| if (id === "simulate") return true; | ||
| return isBinAvailable(resolveBin(getProvider(id))); |
There was a problem hiding this comment.
Treat WSL projects as cross-boundary provider hosts
For a Windows project whose path is under \\wsl$\..., the provider CLI runs inside WSL and may legitimately be absent from the Windows PATH; runner.js therefore treats wslTarget(project) like an SSH boundary and skips the local binary check. This new predicate exempts only remoteHost, so creating a thread discards an otherwise valid project provider/model and falls back to the global defaults whenever the CLI is installed only inside WSL. Reuse the runner's boundary predicate or also recognize wslTarget(project) here.
Useful? React with 👍 / 👎.
| if ( | ||
| opts?.inheritProvider !== false && | ||
| inheritFrom && | ||
| !project?.threadDefaults?.provider | ||
| ) { |
There was a problem hiding this comment.
Keep automatic inheritance out of last-used tracking
When a project has { lastUsed: true } but no stored provider, this condition still performs the existing automatic inheritance from the selected thread. That call goes through threads:setProvider, whose new handler records every such call as a user pick, so merely creating a thread silently persists the previously selected thread's provider/model as the project defaults. Treat last-used mode as a project default here as well, or provide a way for this automatic setter call to bypass recordLastUsedDefaults.
Useful? React with 👍 / 👎.
Item G2 of #1501.
What changed
threadDefaultson the project via the existingprojects.update, so there's no new IPC channel.createThread, so every creation path gets them: UI, issue starters, autodispatch and PR checkout. Existing threads are never touched.projectDefaultsFor:Verified independently, on main merged with this branch and #1502:
vite buildpasses.provider-switch-contextunder load (renderer load average ~30); it passes alone (5 of 5).Design call to confirm: an explicit provider at creation still takes the project's effort and permission mode; only the model is tied to the provider.
🤖 Generated with Claude Code