Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add Explore mode as subagent-only modality#24448

Merged
ibetitsmike merged 14 commits into
mainfrom
explore-mode-p6s4
Apr 17, 2026
Merged

feat: add Explore mode as subagent-only modality#24448
ibetitsmike merged 14 commits into
mainfrom
explore-mode-p6s4

Conversation

@ibetitsmike
Copy link
Copy Markdown
Collaborator

@ibetitsmike ibetitsmike commented Apr 16, 2026

This PR was authored by Mux on behalf of Mike.

Introduce Explore mode, a read-only subagent modality for delegated
discovery and code investigation.

What

Adds a spawn_explore_agent tool that creates child chats restricted to
read-only operations. An admin can optionally configure a deployment-wide
model override so Explore subagents use a model optimized for large context
or reasoning without changing the root chat's model.

Backend

  • New ChatModeExplore enum value (migration 000471).
  • spawn_explore_agent tool definition with read-only allowlist:
    read_file, execute, process_output, read_skill, read_skill_file.
    Write tools, file editors, and nested subagent spawning are blocked.
  • Deployment config storage for the Explore model override
    (agents_chat_explore_model_override in site_configs).
  • Model resolution hierarchy: configured override, then current turn model,
    then global default. Silent fallback with warning log when the override
    becomes unavailable.
  • RBAC: AsChatd for daemon reads, ActionRead and ActionUpdate on
    ResourceDeploymentConfig for admin API calls.
  • Plan mode root chats can use spawn_explore_agent for read-only research,
    matching the planning prompt guidance.
  • The Explore override config API now reports malformed saved overrides as
    "treated as unset" so admins can clear them explicitly.

Frontend

  • ExploreModelOverrideSettings component in admin agent behavior settings.
    Uses ModelSelector, handles unavailable model warnings, and supports
    explicit Save and Clear actions.
  • Malformed saved overrides show a warning and require an explicit Save to
    clear, instead of Clear auto-submitting behind the scenes.

Tests

  • Integration: TestExploreSubagentIsReadOnly (full spawn flow, tool
    verification, prompt overlay, DB state).
  • Unit: tool allowlist tests for explore, plan, and default modes.
  • Internal: model override resolution with valid, invalid UUID, disabled, and
    unconfigured override scenarios.
  • RBAC: dbauthz_test.go for GetChatExploreModelOverride and
    UpsertChatExploreModelOverride.
  • API: admin set and clear, malformed stored override reporting, disabled
    model rejection, non-admin denial.

Introduce Explore mode for delegated read-only research subagents:

- Add 'explore' to chat_mode ENUM (migration 000471)
- Add deployment-config storage for Explore model override
- Implement spawn_explore_agent tool with read-only allowlist
- Add behavior-profile resolver for model selection hierarchy
- Harden RBAC: use AsChatd for daemon reads, ActionRead/ActionUpdate
  for admin API calls
- Add admin UI component for Explore model override settings
- Add integration tests for subagent spawning and tool filtering
@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

@codex review

@ibetitsmike ibetitsmike changed the title feat(coderd/x/chatd): add Explore mode as subagent-only modality feat: add Explore mode as subagent-only modality Apr 16, 2026
Copy link
Copy Markdown

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

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: 26f03cf826

ℹ️ 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 coderd/exp_chats.go Outdated
Comment thread coderd/exp_chats.go
@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

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

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: 55b71fe472

ℹ️ 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 coderd/exp_chats.go
@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

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

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: 16d0cf2573

ℹ️ 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 coderd/x/chatd/subagent.go
@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

@codex review

@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

Mux is working on behalf of Mike.

Copy link
Copy Markdown

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

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: 1536eea8b0

ℹ️ 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 coderd/database/dbauthz/dbauthz.go Outdated
@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

@codex review

@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

Mux is working on behalf of Mike.

Copy link
Copy Markdown

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

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: a8f0e28f3d

ℹ️ 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 coderd/database/dbauthz/dbauthz.go
Comment thread site/src/pages/AgentsPage/components/ChatElements/ModelSelector.test.tsx Outdated
@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

@codex review

@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

Mux is working on behalf of Mike.

Copy link
Copy Markdown

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

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: 4090169839

ℹ️ 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".

@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

@codex review

@ibetitsmike
Copy link
Copy Markdown
Collaborator Author

Mux is working on behalf of Mike.

Comment thread site/src/pages/AgentsPage/components/ExploreModelOverrideSettings.tsx Outdated
Comment thread site/src/pages/AgentsPage/components/ExploreModelOverrideSettings.tsx Outdated
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ 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".

@ibetitsmike ibetitsmike merged commit 73b5058 into main Apr 17, 2026
33 checks passed
@ibetitsmike ibetitsmike deleted the explore-mode-p6s4 branch April 17, 2026 11:40
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants