Skip to content

🤖 feat: resolve custom agents' inherited defaults outside the agent picker - #5896

Closed
ibetitsmike wants to merge 3 commits into
mike/server-side-ai-resolverfrom
mike/server-side-ai-agent-bases
Closed

ibetitsmike wants to merge 3 commits into
mike/server-side-ai-resolverfrom
mike/server-side-ai-agent-bases

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

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.

AgentContext now records each loaded agent's base for its workspace or project scope (setAgentBases in aiSelectionIntent.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.json instead 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

  • "a custom agent resolves its base agent's defaults from the loaded agent list" (workspaceAiSettingsSync.test.ts): with the registry set, a custom agent resolves its base's configured model and thinking level without an agent list.
  • "readers outside the agent context resolve a custom agent's inherited defaults" (AgentContext.test.tsx): after AgentContext loads a custom agent with an Exec base, a plain getWorkspaceAiSelection call returns Exec's configured model.
  • "a failed agent refresh drops the inherited defaults it loaded before" (same file): after a failed refresh, readers stop inheriting through agents that are no longer loaded.
  • make static-check and the touched test suites pass at the top of the stack; CI checks each layer on its own.

Review record

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
@ibetitsmike
ibetitsmike added this pull request to stack #5868 October 8, 2026 21:03
@ibetitsmike ibetitsmike changed the title mike/server side ai agent bases 🤖 feat: resolve custom agents' inherited defaults outside the agent picker Oct 8, 2026
@ibetitsmike
ibetitsmike marked this pull request as ready for review October 8, 2026 21:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T00:28:05.193662Z 64c30f7 New commits
🔒 Security Review ✅ Completed 2026-10-09T00:27:05.131663Z 64c30f7 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/contexts/AgentContext.tsx
Comment thread src/browser/utils/aiSelectionIntent.ts
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/browser/utils/workspaceAiSettingsSync.ts
@ibetitsmike
ibetitsmike removed this pull request from stack #5868 October 9, 2026 04:49
@ibetitsmike

Copy link
Copy Markdown
Contributor Author

Landed in #5916 (7b9899d), which collapsed this stack into one squash merge.

@ibetitsmike ibetitsmike closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant