Skip to content

[Feature Request] Add Goal Mode and Plan Mode similar to Codex CLI #41

Description

@meesudzu

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

  • --goal and /goal start goal mode; status visible in UI.
  • get_goal / update_goal exposed with documented schemas.
  • --plan and /plan block mutating tools; update_plan only.
  • Plan approval transitions cleanly to execution.
  • Goal + plan combo executes plan to completion within budget.
  • Docs updated (README, usage guide).
  • Tests for goal state machine and plan-mode tool gating.

References

Environment

  • minimax-code version: latest main
  • OS: any
  • Auth: not required for this feature request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions