Skip to content

[codex] Allow neo TUI sentinel flag forwarding#25

Draft
IYENTeam wants to merge 1 commit into
code-yeongyu:mainfrom
IYEN-AI:codex/neo-tui-sentinel-forwarding
Draft

[codex] Allow neo TUI sentinel flag forwarding#25
IYENTeam wants to merge 1 commit into
code-yeongyu:mainfrom
IYEN-AI:codex/neo-tui-sentinel-forwarding

Conversation

@IYENTeam
Copy link
Copy Markdown

@IYENTeam IYENTeam commented May 25, 2026

What changed

  • Fixed parseArgs so senpi --neo -- ... stops Node-side parsing at the sentinel and lets neo-mode forward the tail to the Rust binary.
  • Added a regression test covering --neo -- --list-themes --theme dracula parser behavior.
  • Updated the existing neo forwarding regression comment and changelog entry.

Why

splitNeoArgs already documented and tested the backend-vs-Rust split, but the main CLI parser rejected Rust-only flags before runNeoMode could execute. This made documented commands like senpi --neo -- --list-themes fail 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.ts
  • npm run check
  • npm run build
  • tmux runtime smoke: SENPI_NEO_TUI_DEV=1 node packages/coding-agent/dist/cli.js --neo -- --list-themes printed bundled theme ids and exited 0.

Not tested

  • Full interactive agent session through the native TUI.

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 like senpi --neo -- --list-themes.

  • Bug Fixes
    • Stop parsing at -- when --neo is set; forward the tail to neo-mode for Rust TUI handling.
    • Preserve existing sentinel behavior when not in neo mode (tail collected as messages).
    • Added regression tests for --neo -- --list-themes --theme dracula and updated changelog.

Written for commit 7b2ac6c. Summary will update on new commits. Review in cubic

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
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.

2 participants