Repository navigation
fix(codex): load always-on rules in the interactive TUI - #288
Closed
flyingnobita wants to merge 2 commits into
Closed
flyingnobita wants to merge 2 commits into
flyingnobita wants to merge 2 commits into
Conversation
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
Author
|
Wrong repository: this branch lives in the flyingnobita/i-have-adhd fork, so the pull request belongs there. Closing. |
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.
Problem
The Codex TUI never receives the always-on ruleset.
codexParent()returns""for a plaincodexargv (no subcommand), andclassifyCodex()maps every unrecognised subcommand tounclear, 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:codex exec "hi"{"parent":"exec","result":"skipped-non-human"}{"parent":"unknown","result":"skipped-unclear"}With
daemon_auto_start = falsethere is no managed daemon, so the only human signal an interactive session has is its own argv.Change
codexparent → human,reason: codex-tui,signals.parent: tui.codex exec/estay non-human.--help/--versionone-shots and a value flag with a missing value stay unclear.Tradeoff: argv inspection cannot distinguish a human TUI from an agent-spawned plain
codexprocess. That is accepted — a plaincodexparent is the TUI by definition.Verification
python3 -m unittest discover -s tests— 133 tests, OKpython3 scripts/run_evals.py validate—Evaluation cases are valid.bun scripts/check_context_compat.ts— passedclaude plugin validate .— passedRefs: #3