[codex] Allow neo TUI sentinel flag forwarding#25
Draft
IYENTeam wants to merge 1 commit into
Draft
Conversation
The documented `senpi --neo -- ...` contract was implemented in splitNeoArgs, but parseArgs still processed the sentinel tail first and rejected Rust-only flags such as `--list-themes`. Stop parsing at the sentinel once `--neo` has been seen so the original argv can be handed to neo-mode for the backend/TUI split.\n\nConstraint: Preserve normal senpi parsing before the sentinel and keep the original argv split in neo-mode as the forwarding source of truth.\nRejected: Teach the main parser every Rust TUI flag | that would duplicate the clap surface and recreate drift.\nConfidence: high\nScope-risk: narrow\nTested: npx tsx ../../node_modules/vitest/dist/cli.js --run test/suite/regressions/neo-tui-arg-parse.test.ts test/suite/regressions/neo-tui-arg-forwarding.test.ts\nTested: npm run check\nTested: npm run build\nTested: tmux runtime smoke for SENPI_NEO_TUI_DEV=1 node packages/coding-agent/dist/cli.js --neo -- --list-themes\nNot-tested: Full interactive agent session through the native TUI
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.
What changed
parseArgssosenpi --neo -- ...stops Node-side parsing at the sentinel and letsneo-modeforward the tail to the Rust binary.--neo -- --list-themes --theme draculaparser behavior.Why
splitNeoArgsalready documented and tested the backend-vs-Rust split, but the main CLI parser rejected Rust-only flags beforerunNeoModecould execute. This made documented commands likesenpi --neo -- --list-themesfail at runtime.Validation
npx tsx ../../node_modules/vitest/dist/cli.js --run test/suite/regressions/neo-tui-arg-parse.test.ts test/suite/regressions/neo-tui-arg-forwarding.test.tsnpm run checknpm run buildSENPI_NEO_TUI_DEV=1 node packages/coding-agent/dist/cli.js --neo -- --list-themesprinted bundled theme ids and exited0.Not tested
Summary by cubic
Fixes
senpi --neo -- ...so Rust TUI flags after the sentinel are passed through to the native binary instead of being rejected by the Node CLI parser. This restores the documented neo TUI contract and unblocks commands likesenpi --neo -- --list-themes.--when--neois set; forward the tail to neo-mode for Rust TUI handling.--neo -- --list-themes --theme draculaand updated changelog.Written for commit 7b2ac6c. Summary will update on new commits. Review in cubic