Repository navigation
🤖 feat: resolve custom agents' inherited defaults outside the agent picker - #5896
ibetitsmike wants to merge 3 commits into
Conversation
Sends from retry, resume, compaction and the plan handoff, the title bar, the palette and the VS Code composer resolve AI picks without an agent list. Once they read the resolver, a custom agent would lose the model, thinking level and Pro mode it inherits from its base agent until the workspace saved its own settings. The agent context now records each loaded agent's base for its workspace or project scope, and the resolver falls back to that list. Stack-Layer: A2a2
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: b5b3240625
ℹ️ 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".
Stack-Layer: A2a2
A failed refresh cleared the agent list but kept the inheritance map from the last good load, so readers outside the agent context still resolved defaults through agents that were no longer loaded. Stack-Layer: A2a2
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64c30f7d14
ℹ️ 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".
Summary
Once they move to the resolver, several readers resolve AI picks without the agent list:
getSendOptionsFromStorage(retry, resume, compaction and the plan handoff), the title bar, the command palette and the VS Code composer. A custom agent that inherits its model, thinking level or Pro mode from a base agent would then fall back to project or global defaults in those places until the workspace saved its own settings, while the desktop composer showed the inherited values.AgentContextnow records each loaded agent's base for its workspace or project scope (setAgentBasesinaiSelectionIntent.ts) when the agent list loads, and the resolver uses that registry (getAgentBases) when a caller passes no agent list. A failed load clears the scope's bases along with its agent list. Callers that do pass one are unchanged. No reader uses the resolver yet, so nothing changes for users in this layer.Stack
Milestone M4 of the server-side settings stack, on top of M3 (#5869 to #5879): per-workspace AI picks (model, thinking level, reasoning mode, agent and Auto routing) are stored in workspace metadata in
config.jsoninstead of per-browser localStorage keys, so every browser shows the same picks. An unsent picker change stays in memory in its tab until a send saves it, and a reload before sending drops it, as the plan accepts. Layer 3 of 20.Testing
workspaceAiSettingsSync.test.ts): with the registry set, a custom agent resolves its base's configured model and thinking level without an agent list.AgentContext.test.tsx): afterAgentContextloads a custom agent with an Exec base, a plaingetWorkspaceAiSelectioncall returns Exec's configured model.make static-checkand the touched test suites pass at the top of the stack; CI checks each layer on its own.Review record
efe7e29096, because a fork without a message dropped the source's unsent picks (fixed by 🤖 feat: fork a workspace with the source composer's unsent AI picks #5897, 🤖 refactor: resolve the workspace agent from metadata and an unsent pick #5908 and 🤖 refactor: resolve auto routing from the unsent pick, saved flags and agent defaults #5909); everything else passed. Round 2: PASS on80f2b5379e: forks from all five entry points keep the unsent picks, startup removes the retired keys, and the round 1 checks still pass; the plan handoff was not exercised because the mock model cannot propose a plan. The Codex round 1 fixes made since then have no remote UAT yet; that is left to the next UAT round on 🤖 refactor: keep preferences and workspace AI picks on the server #5916.b5b3240625: 2 findings: 1 fixed in 64c30f7, 1 declined with the reason in its thread. Mike asked to land the stack as one PR, so further review runs on 🤖 refactor: keep preferences and workspace AI picks on the server #5916.efe7e29096, probe edits in production code).