Skip to content

v0.8.63: Add first-class sub-agent toggle#3327

Open
BovmantH wants to merge 3 commits into
Hmbown:mainfrom
BovmantH:BovmantH/3305-subagent-toggle
Open

v0.8.63: Add first-class sub-agent toggle#3327
BovmantH wants to merge 3 commits into
Hmbown:mainfrom
BovmantH:BovmantH/3305-subagent-toggle

Conversation

@BovmantH

Copy link
Copy Markdown

Summary

  • Add /config subagents on|off|status plus /config features.subagents true|false as first-class controls for the existing features.subagents flag.
  • Keep session-only changes live by wiring AppAction::UpdateFeatures through Op::SetFeatures; persisted changes write [features] subagents = ....
  • Make only features.subagents editable in the native /config Experimental section, and document the difference between the global feature flag and [subagents] max_depth = 0.
  • Applied Gemini code review suggestions: persist before updating in-memory state, use eq_ignore_ascii_case for efficiency.

Closes #3305.

Verification

  • cargo fmt -- --check
  • cargo test -p codewhale-tui --bins subagent
  • cargo test -p codewhale-tui --bins set_features_op_emits_runtime_update_status
  • cargo test -p codewhale-tui --bins config_view_includes_expected_editable_rows
  • cargo test -p codewhale-tui --bins config_view_experimental_features_show_effective_state_and_overrides

BovmantH added 2 commits June 19, 2026 15:14
- Reorder set_subagents_feature to persist before updating in-memory state
- Use eq_ignore_ascii_case to avoid heap allocation in value parsing
@BovmantH BovmantH requested a review from Hmbown as a code owner June 19, 2026 07:14

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions

Copy link
Copy Markdown

Thanks @BovmantH for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces first-class TUI controls and dynamic configuration support for the subagents feature flag. It allows users to check, toggle, and persist the subagents feature flag via /config subagents commands, updates the experimental configuration view to make this flag editable, and refactors the engine to support updating feature flags dynamically at runtime. Documentation has also been updated to clarify the distinction between the global subagents feature flag and the max_depth limit. Feedback suggests making the key matching in is_subagents_config_key more robust by converting the key to lowercase and supporting hyphenated variants under the features. and feature. prefixes.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +436 to +441
fn is_subagents_config_key(key: &str) -> bool {
matches!(
key,
"subagents" | "sub-agents" | "features.subagents" | "feature.subagents"
)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To make the key matching more robust and user-friendly, we should:

  1. Convert the input key to lowercase (using to_ascii_lowercase()) to ensure case-insensitive matching when queried via /config (since show_single_setting might not lowercase the key).
  2. Support hyphenated variants under the features. and feature. prefixes (e.g., features.sub-agents and feature.sub-agents) for completeness, since sub-agents is already supported as a standalone key.
Suggested change
fn is_subagents_config_key(key: &str) -> bool {
matches!(
key,
"subagents" | "sub-agents" | "features.subagents" | "feature.subagents"
)
}
fn is_subagents_config_key(key: &str) -> bool {
matches!(
key.to_ascii_lowercase().as_str(),
"subagents"
| "sub-agents"
| "features.subagents"
| "features.sub-agents"
| "feature.subagents"
| "feature.sub-agents"
)
}

- Use to_ascii_lowercase() for case-insensitive matching
- Add features.sub-agents and feature.sub-agents variants

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

v0.8.63: Add a first-class sub-agent on/off switch

1 participant