Skip to content

feat(forge): ultracode / multi-agent escalation in the default agent#164

Closed
justrach wants to merge 1 commit into
release/0.2.17from
feat/forge-ultracode-mode
Closed

feat(forge): ultracode / multi-agent escalation in the default agent#164
justrach wants to merge 1 commit into
release/0.2.17from
feat/forge-ultracode-mode

Conversation

@justrach

@justrach justrach commented Jun 4, 2026

Copy link
Copy Markdown
Owner

What

Teaches the default forge agent to escalate to multi-agent orchestration (parallel task sub-agents) instead of working sequentially — no mode switch needed. Two triggers:

  1. Explicit keywordultracode / ultraworkflow / workflow in the message => decompose + fan out (this overrides the general "don't sub-agent for exploration" rule, since the user explicitly opted in).
  2. Judgment — for genuinely decomposable work (multi-file audits, multi-perspective analysis, independent research/edits); stays direct for single-file edits, quick lookups, or tightly sequential work.

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)

  • ultracode research task -> 3 parallel sage agents + clean line-cited synthesis, no hangs (and Context … / 360k, confirming the 400K context cap is live too).
  • ultracode write task -> forge workers 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

…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>
@github-actions github-actions Bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Jun 4, 2026
@justrach justrach changed the base branch from main to release/0.2.17 June 4, 2026 06:56
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions Bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Jun 9, 2026
@github-actions

Copy link
Copy Markdown

PR closed after 10 days of inactivity.

@github-actions github-actions Bot closed this Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant