Summary
Add two new interaction modes to minimax-code, inspired by Codex CLI:
- Goal Mode: persistent objective with token budget; agent auto-continues until goal achieved, blocked, or budget exhausted. State (objective, status, token usage, elapsed time) surfaced to user.
- Plan Mode: read-only planning phase. Agent can read files, search code, gather context, and emit a structured plan, but cannot edit files or run mutating commands. User reviews/approves plan before execution mode begins.
Motivation
minimax-code currently operates turn-by-turn without long-running objective tracking or a dedicated planning phase. Codex CLI demonstrates value of:
- Goal mode: lets user set a multi-step objective, walk away, return to completed work or clear status report.
- Plan mode: prevents premature edits, encourages upfront design, builds trust for risky refactors.
Adopting both reduces round-trips and surfaces intent clearly.
Proposed Design
Goal Mode
- Entry:
minimax-code --goal "<objective>" [--budget <tokens>] or /goal <objective> slash command.
- New tool:
get_goal / create_goal / update_goal with statuses active, complete, blocked.
- Loop: agent invoked repeatedly with goal context until terminal status.
- UI: persistent footer showing objective, status, tokens used, remaining budget, elapsed time.
- Optional
token_budget (positive int) gates total spend; agent self-reports usage each turn.
Plan Mode
- Entry:
--plan flag or /plan slash command. Entering plan mode disables apply_patch, write/exec mutating tools.
- Agent uses
update_plan to emit ordered steps; user gets preview, can edit, approve, or send back for revision.
- Approval transitions to normal execution mode with plan as context.
- Combine with goal mode: goal + plan = auto-execute approved plan to completion.
Tooling
- New MCP-style tools:
create_goal, update_goal, get_goal, request_user_input (plan review).
update_plan already present; expose plan steps in both modes.
Alternatives
- Keep current turn-based flow; users manually re-prompt. Lower value, more friction.
- Single combined "auto" mode without explicit plan approval. Riskier for non-trivial tasks.
Acceptance Criteria
References
Environment
- minimax-code version: latest main
- OS: any
- Auth: not required for this feature request
Summary
Add two new interaction modes to minimax-code, inspired by Codex CLI:
Motivation
minimax-code currently operates turn-by-turn without long-running objective tracking or a dedicated planning phase. Codex CLI demonstrates value of:
Adopting both reduces round-trips and surfaces intent clearly.
Proposed Design
Goal Mode
minimax-code --goal "<objective>" [--budget <tokens>]or/goal <objective>slash command.get_goal/create_goal/update_goalwith statusesactive,complete,blocked.token_budget(positive int) gates total spend; agent self-reports usage each turn.Plan Mode
--planflag or/planslash command. Entering plan mode disablesapply_patch, write/exec mutating tools.update_planto emit ordered steps; user gets preview, can edit, approve, or send back for revision.Tooling
create_goal,update_goal,get_goal,request_user_input(plan review).update_planalready present; expose plan steps in both modes.Alternatives
Acceptance Criteria
--goaland/goalstart goal mode; status visible in UI.get_goal/update_goalexposed with documented schemas.--planand/planblock mutating tools;update_planonly.References
Environment