You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If a PR has Codex review comments, address + resolve them, then re-request review by commenting `@codex review` on the PR.
70
71
- Prefer `gh` CLI for GitHub interactions over manual web/curl flows.
71
-
-In Orchestrator mode, delegate implementation/verification commands to `exec` or `explore` sub-agents and integrate their patches; do not bypass delegation with direct local edits.
72
-
-In Orchestrator mode, route higher-complexity implementation tasks to `plan` sub-agents so they can research and produce a precise plan before auto-handoff to implementation.
72
+
-When delegation is required by the active mode, use `exec` or `explore` sub-agents as directed and integrate their patches; do not bypass delegation with direct local edits.
73
+
-Keep implementation tasks on `exec` sub-agents; use a top-level plan workspace when you need a separate planning phase before delegation.
73
74
74
75
- User preference: when work is already on an open PR, push branch updates at the end of each completed change set so the PR stays current.
75
76
-**PR creation gate:** Do **not** open/create a pull request unless the user explicitly asks (e.g., "open a PR", "create PR", "submit this"). By default, complete local validation, commit/push branch updates as requested, and let the user review before deciding whether to open a PR.
@@ -81,11 +82,11 @@ Core workflow:
81
82
When a PR exists, you MUST remain in this loop until the PR is fully ready:
82
83
83
84
1. Push your latest fixes.
84
-
2. Run local validation (`make static-check` and targeted tests as needed); in Orchestrator mode, delegate command execution to sub-agents.
85
+
2. Run local validation (`make static-check` and targeted tests as needed); delegate command execution to sub-agents when the active mode requires it.
85
86
3. Request review with `@codex review`.
86
87
4. Run `./scripts/wait_pr_ready.sh <pr_number>` (which must execute `./scripts/wait_pr_checks.sh <pr_number> --once` while checks are pending).
87
-
5. If Codex leaves comments, address them (delegate fixes in Orchestrator mode), resolve threads with `./scripts/resolve_pr_comment.sh <thread_id>`, push, and repeat.
88
-
6. If checks/mergeability fail, fix issues locally (delegate fixes in Orchestrator mode), push, and repeat.
88
+
5. If Codex leaves comments, address them (delegating fixes when required by the active mode), resolve threads with `./scripts/resolve_pr_comment.sh <thread_id>`, push, and repeat.
89
+
6. If checks/mergeability fail, fix issues locally (delegating fixes when required by the active mode), push, and repeat.
89
90
90
91
The only early-stop exception is when the reviewer is clearly misunderstanding the intended change and further churn would be counterproductive. In that case, leave a clarifying PR comment and pause for human direction.
Copy file name to clipboardExpand all lines: docs/agents/index.mdx
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -436,7 +436,7 @@ When a plan is present (default):
436
436
- Treat the accepted plan as the source of truth. Its file paths, symbols, and structure were validated during planning — do not routinely spawn `explore` to re-confirm them. Exception: if the plan references stale paths or appears to have been authored/edited by the user without planner validation, a single targeted `explore` to sanity-check critical paths is acceptable.
437
437
- Spawning `explore` to gather _additional_ context beyond what the plan provides is encouraged (e.g., checking whether a helper already exists, locating test files not mentioned in the plan, discovering existing patterns to match). This produces better implementation task briefs.
438
438
- Do not spawn `explore` just to verify that a planner-generated plan is correct — that is the planner's job, and the plan was accepted by the user.
439
-
- Convert the plan into concrete implementation subtasks and start delegation (`exec`for low complexity, `plan` for higher complexity).
439
+
- Convert the plan into concrete implementation subtasks and start delegation with `exec`sub-agents.
440
440
441
441
What you are allowed to do directly in this workspace:
442
442
@@ -452,8 +452,8 @@ Hard rules (delegate-first):
452
452
- Trust `explore` sub-agent reports as authoritative for repo facts (paths/symbols/callsites). Do not redo the same investigation yourself; only re-check if the report is ambiguous or contradicts other evidence.
453
453
- For correctness claims, an `explore` sub-agent report counts as having read the referenced files.
454
454
-**Do not do broad repo investigation here.** If you need context, spawn an `explore` sub-agent with a narrow prompt (keeps this agent focused on coordination).
455
-
-**Do not implement features/bugfixes directly here.** Spawn `exec`(simple) or `plan` (complex) sub-agents and have them complete the work end-to-end.
456
-
-**Do not use `bash` for file reads/writes, manual code editing, or broad repo exploration.**`bash` in this workspace is for orchestration-only operations: `git`/`gh` repo management, targeted post-apply verification checks, and waiting for PR review/CI outcomes. If direct checks fail due to code issues, delegate fixes to `exec`/`plan` sub-agents instead of implementing changes here.
455
+
-**Do not implement features/bugfixes directly here.** Spawn `exec` sub-agents and have them complete the work end-to-end.
456
+
-**Do not use `bash` for file reads/writes, manual code editing, or broad repo exploration.**`bash` in this workspace is for orchestration-only operations: `git`/`gh` repo management, targeted post-apply verification checks, and waiting for PR review/CI outcomes. If direct checks fail due to code issues, delegate fixes to `exec` sub-agents instead of implementing changes here.
457
457
-**Never read or scan session storage.** This includes `~/.mux/sessions/**` and `~/.mux/sessions/subagent-patches/**`. Treat session storage as an internal implementation detail; do not shell out to locate patch artifacts on disk. Only use `task_apply_git_patch` to access patches.
458
458
459
459
Delegation guide:
@@ -474,12 +474,10 @@ Delegation guide:
474
474
Trust Explore reports as authoritative; do not re-verify unless ambiguous/contradictory.
475
475
If starting points + acceptance are already clear, skip initial explore and only explore when blocked.
476
476
- Create one or more git commits before `agent_report`.
477
-
- Use `plan` for higher-complexity subtasks that touch multiple files/locations, require non-trivial investigation, or have an unclear implementation approach.
478
-
- Default to `plan` when a subtask needs coordinated updates across multiple locations, unless the edits are mechanical and already fully specified.
479
-
- For higher-complexity implementation work, prefer `plan` over `exec` so the sub-agent can do targeted research and produce a precise plan before implementation begins.
477
+
- Use `exec` for implementation subtasks, including higher-complexity work.
478
+
- For higher-complexity work, do a small amount of parent-side framing first so the `exec` brief includes the goal, constraints, sequencing, and key files.
480
479
- Good fit: multi-file refactors, cross-module behavior changes, unfamiliar subsystems, or work where sequencing/dependencies need discovery.
481
-
- Plan subtasks automatically hand off to implementation after a successful `propose_plan`; expect the usual task completion output once implementation finishes.
482
-
- For `plan` briefs, prioritize goal + constraints + acceptance criteria over file-by-file diff instructions.
480
+
- If the implementation approach is still unclear after targeted exploration, switch to a top-level plan workspace before continuing delegation instead of spawning a plan sub-agent.
483
481
- Use `desktop` for GUI-heavy desktop automation that requires repeated screenshot → act → verify loops (for example, interacting with application windows, clicking through UI flows, or visual verification). The desktop agent enforces a grounding discipline that keeps visual context local.
2. Spawn one implementation sub-agent task per subtask with `run_in_background: true` (`exec` for low complexity, `plan` for higher complexity).
527
+
2. Spawn one `exec`implementation sub-agent task per subtask with `run_in_background: true`.
530
528
3. Await the batch via `task_await`.
531
-
4. For each successful implementation task (`exec` directly, or `plan` after auto-handoff to implementation), integrate patches one at a time:
529
+
4. For each successful implementation task, integrate patches one at a time:
532
530
- Treat every successful child task with a `taskId` as pending patch integration, whether the completion arrived inline from `task` or later from `task_await`.
533
531
- Complete each dry-run + real-apply pair before starting the next patch. Applying one patch changes `HEAD`, which can invalidate later dry-run results.
534
532
- Dry-run apply: `task_apply_git_patch` with `dry_run: true`.
- Run focused verification directly with `bash` when practical (for example: targeted tests or the repo's standard full-validation command), or delegate verification to `explore`/`exec` when investigation/fixes are likely.
545
543
- Use `git`/`gh` directly for PR orchestration when a PR already exists (pushes, review-request comments, replies to review remarks, and CI/check-status waiting loops). Create a new PR only when the user explicitly asks.
546
544
- PASS: summary-only (no long logs).
547
-
- FAIL: include the failing command + key error lines; then delegate a fix to `exec`/`plan` and re-verify.
545
+
- FAIL: include the failing command + key error lines; then delegate a fix to `exec` and re-verify.
548
546
549
547
Sequential protocol (only for dependency chains):
550
548
551
-
1. Spawn the prerequisite implementation task (`exec` or `plan`, based on complexity) with`run_in_background: false`.
549
+
1. Spawn the prerequisite implementation task with `agentId: "exec"` and`run_in_background: false`.
552
550
2. If step 1 returns `queued`/`running` without a completed report, call `task_await` with the returned `taskId` before attempting any patch apply. If step 1 returns `status: completed` inline, that same `taskId` still requires patch application.
553
551
3. Dry-run apply its patch (`dry_run: true`); then apply for real (`dry_run: false`). If either step fails, follow the conflict playbook above (including `git am --abort` only when a real apply leaves a git-am session in progress).
554
552
4. Only after the patch is applied, spawn the dependent implementation task.
@@ -579,7 +577,7 @@ description: Create a plan before coding
579
577
ui:
580
578
color: var(--color-plan-mode)
581
579
subagent:
582
-
runnable: true
580
+
runnable: false
583
581
tools:
584
582
add:
585
583
# Allow all tools by default (includes MCP tools which have dynamic names)
0 commit comments