feat(forge): ultracode / multi-agent escalation in the default agent#164
Open
justrach wants to merge 1 commit into
Open
feat(forge): ultracode / multi-agent escalation in the default agent#164justrach wants to merge 1 commit into
justrach wants to merge 1 commit into
Conversation
…y judgment Teach the default `forge` agent to decide when to fan out across parallel `task` sub-agents instead of grinding sequentially, via two triggers: 1. Explicit keyword opt-in -- `ultracode` / `ultraworkflow` / `workflow` in the message means "orchestrate": decompose and fan out, overriding the general "don't sub-agent for exploration" guidance. 2. Judgment -- for genuinely decomposable work (multi-file audits, multi-perspective analysis, independent research/edits); otherwise stay direct. Routes read-only subtasks to `sage` (read-only, recursion-safe leaves) and edit subtasks to `forge`. Reuses the redundant-read / context guidance from the workflow agent so parallel fan-out doesn't blow the context window. Verified end to end on a built binary: an `ultracode` research task fans out 3 parallel sage agents + synthesizes; an `ultracode` write task dispatches forge workers that write independent files; no hangs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Action required: PR inactive for 5 days. |
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.
What
Teaches the default forge agent to escalate to multi-agent orchestration (parallel
tasksub-agents) instead of working sequentially — no mode switch needed. Two triggers:ultracode/ultraworkflow/workflowin the message => decompose + fan out (this overrides the general "don't sub-agent for exploration" rule, since the user explicitly opted in).Routing: read-only subtasks ->
sage(read-only, recursion-safe leaf agents); edit subtasks ->forge. Reuses the redundant-read / context-window guidance the workflow agent learned, so parallel fan-out does not overflow context.Where
crates/forge_repo/src/agents/codegraff.md— a new "Multi-agent orchestration" section in forge's system prompt (handlebars, gated by{{#if tool_names.task}}).Verification (built binary, real runs)
ultracoderesearch task -> 3 parallelsageagents + clean line-cited synthesis, no hangs (andContext … / 360k, confirming the 400K context cap is live too).ultracodewrite task ->forgeworkers that wrote 3 independent files, no hangs.Note: forge currently sequences parallel write subtasks (conservative about concurrent edits); a follow-up could allow parallel writes on provably-independent files.
🤖 Generated with Claude Code