feat(config): add deep_research feature flag to gate Sage agent#3008
Open
tusharmath wants to merge 6 commits intomainfrom
Open
feat(config): add deep_research feature flag to gate Sage agent#3008tusharmath wants to merge 6 commits intomainfrom
tusharmath wants to merge 6 commits intomainfrom
Conversation
tusharmath
commented
Apr 14, 2026
| self.writeln("Sage agent is disabled. Set `research_subagent = true` in .forge.toml to enable it.")?; | ||
| } else { | ||
| self.on_agent_change(AgentId::SAGE).await?; | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
User should be able to switch to sage if they want to. Sage should only be disabled as a sub-agent.
tusharmath
commented
Apr 14, 2026
| return false; | ||
| } | ||
| true | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
Move this logic closer to the sub-agent task description. The repo must list all the sub-agents always.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a
deep_researchfeature flag to gate the Sage agent behind a config option, keeping it disabled by default.Context
The Sage agent provides deep research capabilities but is not yet ready for general availability. This change introduces a configuration flag so the Sage agent (and its
:sageapp command) can be selectively enabled without requiring a code change or a separate build.Changes
deep_research: boolfield toForgeConfig(defaults tofalse).forge.tomlconfig to includedeep_research = falseforge.schema.jsonto document the new fieldfilter_agentin the agent repository to exclude the Sage agent fromget_agentsandget_agent_infoswhen the flag is disabledAgentRepository::get_agentsandAgentRepository::get_agent_infosKey Implementation Details
A single
filter_agentfunction checks whether the agent id matchesAgentId::SAGEand, if so, gates it onconfig.deep_research. All other agents pass through unconditionally. The config is read once per call and shared between the filter and the rest of the pipeline to avoid redundant reads.Use Cases
deep_research = truein their.forge.tomlTesting
Links
AgentId::SAGE)