Repository navigation
feat: resolve custom agent types in spawn_agent - #51
Conversation
Behind the fork-agent-definitions experiment, spawn_agent resolves custom agent types from the chat's pinned subagent context resources after the built-in types. A custom child runs with the definition body as a system message and the definition's model and reasoning effort unless the call passes explicit ones, and its chat_subagents row records the custom type. The spawn_agent description lists the custom types within a byte budget.
…r custom agent types
Codex Review Summary: ✅ CompletedThis 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. |
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 209c6a7813
ℹ️ 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".
|
@codex review
|
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review
|
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Merged at 7f355e8 after these checks:
|
With the
fork-agent-definitionsexperiment on,spawn_agentaccepts the custom agent types that #38 discovers in the chat's workspace.A chat pins its agent's context resources when it is created. Each pinned
subagentresource with statusokis parsed withworkspacesdk.ParseAgentDefinitionand becomes aspawn_agenttype named after the definition (coderd/x/chatd/fork_agent_definitions.go).custom agent.general,exploreorcomputer_useis dropped, and duplicate names keep the first. Definitions that fail to decode or parse are skipped, and a failed resource read logs a warning and lists only the built-in types, so a bad file never breaks a turn.generalorexplore).modelis matched case-insensitively against the spawnable model configs by config ID, then model, then display name. If nothing matches, the spawn fails and the error points atlist_subagent_models. A definition without a model (or withmodel: inherit) runs on the parent's current model, not the deployment's subagent model override. The definition'seffort/reasoning_effortmust be a valid reasoning effort. An explicitmodel_config_idorreasoning_effortargument still wins.chat_subagentsrow stores the custom type.createSubagentChatWithIDnow writes that row for custom types even withfork-nested-subagentsoff.tools,readonly,mcpanddisallowedToolsare not enforced yet: a custom type gets its base type's tools until the next PR in the stack. Upstream files get only call-site hooks insubagent_catalog.goandsubagent_operations.go.Part of #7.