Skip to content

feat: /codex:review should not ask by default — auto-decide wait vs background #221

@awakia

Description

@awakia

Problem

/codex:review currently calls AskUserQuestion whenever neither --wait nor --background is passed, forcing the user to pick between Wait for results and Run in background on every invocation.

This is especially painful when /codex:review is embedded in a multi-step plan: execution halts at the question prompt and the user has to come back to click through it, defeating the purpose of running the plan unattended.

Asking by default feels wrong for a command that already has all the signal it needs (git status / git diff --shortstat) to make the decision itself.

Proposal

Make auto-decide the default. Drop the AskUserQuestion step when no flag is passed, and use the existing heuristic directly:

  • Tiny change (≈1-2 files, no broader directory-sized work) → run in foreground (--wait)
  • Otherwise → run in background (--background)

--wait / --background remain as explicit overrides for users who want to force a mode.

Optionally, expose a user-level default in companion config (see also #213) so power users can pin wait, background, or auto:

```json
{
"reviewExecutionMode": "auto" | "wait" | "background"
}
```

with auto being the new default.

Why this is safe

  • The heuristic already exists in commands/review.md — the change is just "apply it automatically instead of asking."
  • Background mode is non-destructive: results are retrievable via /codex:status.
  • Users who preferred the prompt can set reviewExecutionMode: "wait" or always pass --wait.

Impact

  • Plans containing /codex:review run end-to-end without human intervention.
  • One less interactive step for the common case.
  • No loss of control — flags still work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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