fix(presets): consolidate agent presets and unbreak Codex launch#178
Merged
fix(presets): consolidate agent presets and unbreak Codex launch#178
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Codex (YOLO)panels failing to launch witherror: unexpected argument '--full-auto' foundafter codex-cli 0.128 deprecated and removed--full-autofrom the top-levelcodexinvocation (regression from eff9335).--permission-mode auto, so the interactive/hands-off preset split no longer buys anything for those two. Drop the qualifier —CodexandClaude Codenow simply are the auto-mode preset.OpenCode (Fresh)andKiloCode (Fresh)siblings into the base preset withresume: fresh.resume: freshso 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.v6 → v7migration handles the cleanup. The Codex (YOLO) matcher recognises every arg shape that landed onrelease/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
ShellCodex(cx),Claude Code(cc),OpenCode(oc),Gemini CLI(gm),KiloCode(kc)Git Changes(gc),Markdown(md),Usage(u)Test plan
cargo test -p horizon-core— 243 passed, 0 failedcargo fmt --all -- --checkcleancargo clippy -p horizon-core --all-targets --all-features -- -D warningsclean./scripts/check-maintainability.shcleancodex --sandbox workspace-write --ask-for-approval on-request --no-alt-screenparses against installed codex 0.128.0Codexpanel from menu → reaches the codex prompt instead of dying with the--full-autoerrorMigration 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 / KiloCodemigration_v6_to_v7_inserts_replacements_at_first_removed_slot— replacement lands at the first-removed slot per agentmigration_v6_to_v7_handles_broken_full_auto_yolo_preset— recovers configs from the broken eff9335 buildmigration_v6_to_v7_preserves_customised_yolo_and_claude_auto_presets— non-default-shaped presets survivemigration_v6_to_v7_skips_replacement_when_customised_codex_keeps_the_name— no duplicate menu entries when user customised the plainCodexmigration_v6_to_v7_preserves_customised_opencode_presets— same for OpenCodemigration_from_v6_via_migrate_if_needed_lands_on_codex_preset— end-to-end via the publicmigrate_if_neededentry