Skip to content

fix(presets): consolidate agent presets and unbreak Codex launch#178

Merged
peters merged 2 commits intomainfrom
fix/consolidate-agent-presets
May 1, 2026
Merged

fix(presets): consolidate agent presets and unbreak Codex launch#178
peters merged 2 commits intomainfrom
fix/consolidate-agent-presets

Conversation

@peters
Copy link
Copy Markdown
Owner

@peters peters commented May 1, 2026

Summary

  • Fix Codex (YOLO) panels failing to launch with error: unexpected argument '--full-auto' found after codex-cli 0.128 deprecated and removed --full-auto from the top-level codex invocation (regression from eff9335).
  • Codex 0.128 boots into auto mode by default and Claude Code v2.1.83+ has --permission-mode auto, so the interactive/hands-off preset split no longer buys anything for those two. Drop the qualifier — Codex and Claude Code now simply are the auto-mode preset.
  • Collapse the resume-only OpenCode (Fresh) and KiloCode (Fresh) siblings into the base preset with resume: fresh.
  • Default Codex and Claude Code presets now also use resume: fresh so every coding agent launched from the menu starts with a clean session — consistent with Gemini, OpenCode, KiloCode. Users who want to resume can use the agent's own resume flow (codex resume, claude --continue) or customise the preset.
  • One v6 → v7 migration handles the cleanup. The Codex (YOLO) matcher recognises every arg shape that landed on release/v0.2.6 (--yolo, broken --full-auto, and the explicit auto-mode args from pre-release dev builds), so any dev who tested the broken intermediate self-heals on next launch. User-customised presets are preserved; replacements aren't inserted when a same-named preset already exists.

Final menu

Section Entries
New Terminal Shell
Agents Codex (cx), Claude Code (cc), OpenCode (oc), Gemini CLI (gm), KiloCode (kc)
Tools Git Changes (gc), Markdown (md), Usage (u)

Test plan

  • cargo test -p horizon-core — 243 passed, 0 failed
  • cargo fmt --all -- --check clean
  • cargo clippy -p horizon-core --all-targets --all-features -- -D warnings clean
  • ./scripts/check-maintainability.sh clean
  • Verified codex --sandbox workspace-write --ask-for-approval on-request --no-alt-screen parses against installed codex 0.128.0
  • Manual: rebuild + relaunch with v6 config (or deleted config) → menu shows the consolidated agent list above
  • Manual: launch Codex panel from menu → reaches the codex prompt instead of dying with the --full-auto error
  • Manual: each agent launched from the menu starts a fresh session

Migration coverage (config v6 → v7)

New tests in config_migration.rs:

  • migration_v6_to_v7_collapses_default_agent_pairs — full-fixture collapse for Codex / Claude / OpenCode / KiloCode
  • migration_v6_to_v7_inserts_replacements_at_first_removed_slot — replacement lands at the first-removed slot per agent
  • migration_v6_to_v7_handles_broken_full_auto_yolo_preset — recovers configs from the broken eff9335 build
  • migration_v6_to_v7_preserves_customised_yolo_and_claude_auto_presets — non-default-shaped presets survive
  • migration_v6_to_v7_skips_replacement_when_customised_codex_keeps_the_name — no duplicate menu entries when user customised the plain Codex
  • migration_v6_to_v7_preserves_customised_opencode_presets — same for OpenCode
  • migration_from_v6_via_migrate_if_needed_lands_on_codex_preset — end-to-end via the public migrate_if_needed entry

peters added 2 commits May 1, 2026 08:42
Codex-cli 0.128 deprecated `--full-auto` and removed it from the top-level
`codex` invocation, so the `Codex (YOLO)` preset (introduced in eff9335)
was failing to launch with `error: unexpected argument '--full-auto'
found` and dying immediately. Auto mode is now the default behavior of
`codex` itself, and Claude Code v2.1.83+ has `--permission-mode auto`,
so the interactive/hands-off split no longer buys anything for those
agents. Same goes for the resume-only OpenCode/KiloCode pairs.

Collapse all four pairs into single, plain-named defaults via one
v6 -> v7 migration:

- `Codex` + `Codex (YOLO)` -> `Codex` (cx, auto mode by default)
- `Claude Code` + `Claude Code (Auto)` -> `Claude Code` (cc, --permission-mode auto)
- `OpenCode` + `OpenCode (Fresh)` -> `OpenCode` (oc, always fresh)
- `KiloCode` + `KiloCode (Fresh)` -> `KiloCode` (kc, always fresh)

The Codex (YOLO) matcher recognises every arg shape that shipped on
release/v0.2.6 (`--yolo`, broken `--full-auto`, and the explicit
auto-mode args from pre-release dev builds). User-customised presets
are preserved untouched, and replacements aren't inserted when a
preset already holds the target name.
…Claude Code

Coding agents launched from the new-panel menu should always start a
fresh session — same behavior as Gemini, OpenCode, and KiloCode after
the consolidation in #178. The two remaining holdouts (Codex and Claude
Code) defaulted to `resume: last`, which auto-resumes the previous
session and surprises users who expected a clean slate from the menu.

Switch both default presets to `resume: fresh`. Users who want to
resume a previous session can launch via the agent's own resume flow
(`codex resume`, `claude --continue`) or customise the preset.
@peters peters merged commit 0e461a0 into main May 1, 2026
13 checks passed
@peters peters deleted the fix/consolidate-agent-presets branch May 1, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant