feat: add experimental flag to allow background agent subagents #539
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
Adds
allow_background_agent_subagentsexperimental flag to enable users to opt-in to recursive background agent spawning viacall_omo_agent.This addresses the use case mentioned in #536 where some users want to call heavy tasks as
background_taskswith full agent orchestration capabilities, despite the risk of exponential task cascades (800+ tasks).Changes
allow_background_agent_subagentsflag toExperimentalConfigSchema(src/config/schema.ts)BackgroundManagerconstructor to acceptExperimentalConfigparameterBackgroundManager.launch()to conditionally applycall_omo_agentrestriction based on flagBackgroundManager(src/index.ts)README.md(English)README.ko.md(Korean)README.ja.md(Japanese)README.zh-cn.md(Chinese)assets/oh-my-opencode.schema.json)Configuration
{ "experimental": { "allow_background_agent_subagents": false } }Default:
false(safe default - prevents recursive spawning)When enabled: Background agents can call
call_omo_agentto spawn subagents recursively.WARNING: May cause exponential task cascades (800+ tasks). Only enable if you need heavy parallel agent orchestration.
Testing
Related
Closes #536
cc @junhoyeo @code-yeongyu
Summary by cubic
Adds an experimental flag to let background agents spawn subagents via call_omo_agent. Default is off to prevent runaway task cascades; opt-in for heavy parallel orchestration.
New Features
Migration
Written for commit 05ad2a4. Summary will update on new commits.