Skip to content

fix(codex): load always-on rules in the interactive TUI - #288

Closed
flyingnobita wants to merge 2 commits into
ayghri:mainfrom
flyingnobita:fix/codex-tui-human
Closed

flyingnobita wants to merge 2 commits into
ayghri:mainfrom
flyingnobita:fix/codex-tui-human

Conversation

@flyingnobita

Copy link
Copy Markdown

Problem

The Codex TUI never receives the always-on ruleset. codexParent() returns "" for a plain codex argv (no subcommand), and classifyCodex() maps every unrecognised subcommand to unclear, so the hook injects only the notice.

Measured on macOS with codex-cli 0.167.0, hooks = true, daemon_auto_start = false, plugin hook trusted:

Launch Decision log
codex exec "hi" {"parent":"exec","result":"skipped-non-human"}
Interactive TUI {"parent":"unknown","result":"skipped-unclear"}

With daemon_auto_start = false there is no managed daemon, so the only human signal an interactive session has is its own argv.

Change

  • No-subcommand codex parent → human, reason: codex-tui, signals.parent: tui.
  • codex exec / e stay non-human.
  • --help / --version one-shots and a value flag with a missing value stay unclear.
  • README and INSTALL signal tables updated; CHANGELOG entry; manifests bumped to 0.5.1.

Tradeoff: argv inspection cannot distinguish a human TUI from an agent-spawned plain codex process. That is accepted — a plain codex parent is the TUI by definition.

Verification

  • python3 -m unittest discover -s tests — 133 tests, OK
  • python3 scripts/run_evals.py validate — Evaluation cases are valid.
  • bun scripts/check_context_compat.ts — passed
  • claude plugin validate . — passed

Refs: #3

Always-on rules load only in Human sessions (Claude, Codex, Pi, omp, OpenCode), with an unclear-session notice, an opt-in decision log, scope/precedence/notices clauses in SKILL.md, and the fork identity for 0.5.0. Closes #1.
A plain `codex` parent has no subcommand, and codexParent() returned ""
for it, so classifyCodex() fell through to unclear and the Codex TUI
received only the notice instead of the ruleset. With
`daemon_auto_start = false` no managed daemon exists, so the managed
daemon signal never appears either.

Classify the no-subcommand parent as the interactive TUI (reason
codex-tui, signal parent=tui). `codex exec` and `e` stay non-human, and
informational one-shots (`--help`, `--version`) or a value flag with a
missing value stay unclear.

Refs: #3
@flyingnobita

Copy link
Copy Markdown
Author

Wrong repository: this branch lives in the flyingnobita/i-have-adhd fork, so the pull request belongs there. Closing.

@flyingnobita
flyingnobita deleted the fix/codex-tui-human branch November 10, 2026 12:07
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