codex icon indicating copy to clipboard operation
codex copied to clipboard

Feature Request: Adaptive Development Mode with Task-Aware Multi-Agent Orchestration and Model Routing

Open icexyli opened this issue 1 week ago • 4 comments

What variant of Codex are you using?

Codex development workflows (proposal applicable to CLI, IDE extension, and App).

What feature would you like to see?

Introduce two complementary development modes: Manual Mode and Adaptive Mode. The goal is to reduce manual switching of models and reasoning effort while improving end-to-end task quality, efficiency, and code maintainability.

User problem

Today I frequently have to choose a model and reasoning level before knowing the true complexity of a task. Weaker settings may miss dependencies or produce incomplete fixes; stronger, high-reasoning settings sometimes add unnecessary abstractions, speculative fallback logic, defensive checks, or unrelated refactoring. A single development request may contain subtasks requiring very different capabilities. Manually switching and coordinating models throughout implementation is inefficient.

Proposed behavior

1. Two user-facing modes

  • Manual Mode: preserve explicit choice of model, reasoning effort, agent configuration, and execution approach.
  • Adaptive Mode: Codex takes responsibility for task analysis, planning, choosing an execution topology, assigning models, coordinating agents, and verifying results. Users can inspect and override decisions or switch modes.

2. Proportional project/task assessment

  • Inspect relevant architecture, conventions, code dependencies, change scope, uncertainty, risk, and acceptance criteria.
  • Keep the initial assessment lightweight for small changes; do not make every task a planning exercise.
  • Decide among direct execution (single agent), planned execution (one or a few agents), or collaborative execution (multiple specialized agents).

3. Task decomposition and dependency-aware execution

  • Break complex tasks into independently verifiable subtasks with explicit owners, inputs/outputs, dependencies, and acceptance criteria.
  • For example, a full module implementation might involve a coordinator, frontend implementation, backend implementation, integration/testing, and optional architecture review.
  • Parallelize only where interfaces and change boundaries are clear; sequence dependent work.

4. Dynamic agent and per-agent model allocation

  • Assign each subtask an appropriate available model and reasoning-effort level; do not hard-code a particular model for every role.
  • Choose agent count based on expected benefit rather than automatically spawning a large team.
  • Reassess allocation at major milestones or when investigation reveals new complexity: escalate difficult debugging/architecture tasks; use efficient models for bounded implementation or checks; retire agents when their work is complete.
  • Respect users' subscriptions, permissions, usage limits, and explicit cost controls; do not create unexpected charges.

5. Shared context, isolation, and coordination

  • Provide a version-aware shared task record: requirements, acceptance criteria, interface/data contracts, key decisions, ownership of files, dependencies, status, and test results.
  • Give each agent relevant context rather than duplicating entire chat histories.
  • Prevent concurrent conflicting edits (for example using separate worktrees and explicit ownership), coordinate integration, and resolve disagreements through the coordinator.

6. Execution quality and feedback

  • Run proportional verification, integrate results, and check the original acceptance criteria end to end.
  • Detect repeated failed fixes and trigger reassessment rather than accumulating speculative patches.
  • Follow the project's engineering conventions and user preferences; avoid unnecessary overengineering and defensive coding while retaining essential correctness, security, and data-integrity checks.
  • Show plan, active agents, chosen models/reasoning levels, significant routing decisions, progress, verification status, and resource usage. Allow manual intervention.

7. Optional optimization preference

  • Quality First
  • Balanced (quality, elapsed time, and resource usage)
  • Efficiency First

These preferences should influence selection without overriding critical correctness or safety requirements.

Example workflow

Request: "Implement a new requirement-management module with creation, state transitions, task breakdown, and execution history."

  1. Coordinator inspects the existing project and drafts acceptance criteria.
  2. Identifies frontend and backend tasks, agrees on API/data contracts, and selects suitable models separately.
  3. Agents implement non-overlapping changes in parallel; difficult problems can be escalated to a stronger reasoning agent.
  4. Integration/testing verifies the complete flow and routes actionable defects back to the relevant agent.
  5. Coordinator delivers a tested result, notes remaining risks, and summarizes resource use.

For a simple UI text or field change, Adaptive Mode should use one agent and skip all unnecessary orchestration.

Additional information

Success criteria: compare against fixed single-agent baselines on real repositories, measuring first-attempt functional correctness, end-to-end completion time, manual interventions, regressions, unnecessary changes/complexity, and total model usage. Multi-agent orchestration should be chosen only when it improves expected overall results.

Incremental rollout:

  1. Task assessment + suggested model/reasoning setting, with manual override.
  2. Automatic task decomposition and per-agent assignment.
  3. Dynamic replanning, lifecycle management, coordinated verification, and outcome-based routing improvements.

Related requests: #58074 (automatic model routing), #53516 (dynamic per-subagent model assignment), and discussion #46658 (combined model/tool/agent orchestration). This proposal connects these ideas into a coherent user-facing development mode focused on the quality of the completed task, not only routing or saving tokens.

icexyli avatar Nov 19 '26 01:11 icexyli

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #61876

Powered by Codex Action

github-actions[bot] avatar Nov 19 '26 01:11 github-actions[bot]

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

Powered by Codex Action

Thanks for flagging #61876 as a potential duplicate.

I've reviewed it and agree that the two proposals overlap in automatic model selection and reasoning-effort optimization.

However, I believe they address different primary objectives:

  • #61876 focuses on resource orchestration, including model routing, local/cloud model integration, usage budgets, execution-loop detection, and recovery.
  • #62394 focuses on end-to-end software development orchestration, introducing Manual and Adaptive development modes, project-aware task analysis, automatic task decomposition, dynamic multi-agent allocation, per-agent model assignment, shared context, dependency management, coordinated execution, and integrated verification.

The key distinction is that #62394 proposes a complete task execution workflow aimed at improving functional correctness, first-attempt completion rates, maintainability, and reducing unnecessary engineering complexity.

Resource optimization is one component of this proposal, but not its primary objective.

I believe the two requests are complementary and could potentially share underlying model-routing capabilities.

For these reasons, I would prefer to keep #62394 open as a separate feature request, unless maintainers consider the broader adaptive development workflow already covered by #61876.

Thanks for reviewing!

icexyli avatar Nov 19 '26 02:11 icexyli

For your requirement-management example, I'd make Adaptive Mode decide at two points: first, whether the API contract is stable enough to split the work; later, whether a specific blocked task needs escalation. Before the frontend/backend boundary is clear, one agent can establish the contract. Once it is clear, workers can build against the same revision. If integration then finds a mismatch, escalate that one task with the failed check and the exact contract revision, rather than upgrading every worker or restarting the whole plan.

One useful addition to the baseline comparison: log the initial decision and the evidence that changed it. A wrong initial estimate that the workflow corrects cheaply is different from a costly retry loop. I'd include a small UI-label change as a control: it should finish without spawning workers.

Disclosure: I maintain TeamSwarm; AI assisted with this comment. The released v0.6.1 has independent conversations and configurable model connections. It isn't a claim that we ship the adaptive routing policy above. In your example, which failure costs you more in practice: discovering a hidden dependency after parallel work starts, or choosing a model that is too weak for an otherwise well-scoped task?

DrPei12 avatar Nov 20 '26 01:11 DrPei12

For the shared work record in point 5, we have implemented that workflow in WorkLedger. We build it at Digital Disruptors.

The approved specification, assigned tasks, recorded sessions, human decisions and change/test evidence stay with the project and work item. Supported agents can retrieve the task context, record progress and leave unfinished work for the next session. A reviewer can request changes with a note, and a supported waiting agent receives the decision. That keeps the agreed requirements and review feedback available as work moves between agents.

Happy to demonstrate the requirement → agent work → human review → revision loop through our free guided 30-day pilot: https://workledger-ai.com/early-access?utm_source=github&utm_medium=referral&utm_campaign=workledger-agent-team-context-2026-11-20

dijarvrella avatar Nov 20 '26 16:11 dijarvrella