feat(atlas): allow Atlas to spawn Hephaestus as subagent for complex tasks#3203
Open
teneburu wants to merge 2 commits intocode-yeongyu:devfrom
Open
feat(atlas): allow Atlas to spawn Hephaestus as subagent for complex tasks#3203teneburu wants to merge 2 commits intocode-yeongyu:devfrom
teneburu wants to merge 2 commits intocode-yeongyu:devfrom
Conversation
Contributor
|
All contributors have signed the CLA. Thank you! ✅ |
|
This review could not be run because your cubic account has exceeded the monthly review limit. If you need help restoring access, please contact contact@cubic.dev. |
Author
|
I have read the CLA Document and I hereby sign the CLA |
9d20876 to
1917836
Compare
…tasks Add orchestrator allowlist (Option B from code-yeongyu#1980) so Atlas can delegate complex autonomous work to Hephaestus via task(subagent_type="hephaestus"). Changes: - subagent-resolver: add ORCHESTRATOR_ALLOWLIST and explicit Hephaestus guard so only Atlas can spawn it, plus self-recursion block - hephaestus/agent: change mode to "all", set task: "deny" permission to prevent recursion (OMC's createDelegateTask bypasses OpenCode permission checks, but this signals intent and blocks OpenCode-native) - atlas/default-prompt-sections: add complexity routing table so Atlas knows when to use Hephaestus vs category-based Sisyphus-Junior Closes code-yeongyu#1980
Replace getAgentListDisplayName with getAgentDisplayName in: - agent-key-remapper.ts: Agent config object keys - agent-priority-order.ts: Core agent ordering - command-config-handler.ts: Command agent fields - start-work/start-work-hook.ts: Session agent display This fixes the bug where ZWSP sort prefixes (\u200B) were leaking into UI display names like "Atlas (Plan Executor) d ". The ZWSP prefixes are still available via getAgentListDisplayName() for internal sorting purposes, but clean names are now used for all user-facing display and API calls.
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
Implements the hybrid Atlas/Hephaestus workflow from #1980 (Option B: orchestrator allowlist).
subagent-resolver.ts: Only Atlas can spawn Hephaestus viatask(subagent_type="hephaestus"). Other agents get a clear error message. Self-recursion is explicitly blocked."primary"to"all", permission updated totask: "deny"(recursion guard - OMC'screateDelegateTask()bypasses OpenCode permission checks, but this signals intent).Key Design Decisions
Why
mode: "all"+ explicit guard instead of keepingmode: "primary"? TheisTaskCallableAgentMode()filter runs after the agent API call. Adding orchestrator awareness there would require threading parent context through every caller. Instead, a dedicated pre-filter check at the top ofresolveSubagentExecution()catches it early with a clear error message.Why
task: "deny"instead ofcall_omo_agent: "deny"? Hephaestus needs explore/librarian for codebase research. Denyingtaskprevents recursion while preserving its autonomous research capability. Note: OMC'screateDelegateTask()replaces OpenCode's built-in task tool and doesn't check the caller's permission ruleset, so this is a defense-in-depth signal, not the primary guard.Status signaling deferred: Hephaestus runs in sync mode (
run_in_background=false) with existing idle detection + stability polling. The<progress>section in Hephaestus's prompt already instructs phase-transition updates. No additional signaling mechanism needed for v1.PR Checklist
bun run typecheckpassesbun run buildsucceedspackage.jsonCloses #1980
Summary by cubic
Enable Atlas to delegate complex, multi-step work to Hephaestus as a subagent with an orchestrator allowlist and recursion guards. Also fixes UI display names by removing hidden ZWSP prefixes. Implements Option B from #1980.
New Features
ORCHESTRATOR_ALLOWLISTandORCHESTRATOR_CALLABLE_PRIMARY_AGENTS; onlyatlascan calltask(subagent_type="hephaestus"); Hephaestus self-recursion blocked with clear errors.mode: "all"and permissiontask: "deny"as a recursion guard.Bug Fixes
getAgentDisplayNameinagent-key-remapper.ts,agent-priority-order.ts,command-config-handler.ts, andstart-work/start-work-hook.ts.Written for commit 091376d. Summary will update on new commits.