Repository navigation
fix(tui): hide eight dead settings and refuse flags the Python agent does not back - #60
Merged
zy1233 merged 1 commit intoOct 31, 2026
Conversation
This was referenced Oct 30, 2026
…does not back An interactive zypi passes no flag to the Python agent, and the agent ignores what goes over the ACP wire except the model and the yolo switch. So the settings page and the command line offered things that did nothing. scripts/tui_pty/flags_probe.py and settings_probe.py measured it (plan, decisions 8 and 14). This change acts on the measurement. Settings page: eight settings are not offered (app/agent_settings.rs, UNBACKED): remember_tool_approvals, default_selected_permission, default_model, toolset.ask_user_question.timeout_enabled, fork_secondary_model, prompt_suggestions, hunk_tracker_mode, auto_update. The filter is the existing setting_gated_off_by_agent, with a new gate hide_unbacked_settings (false in PagerLocalSnapshot::default(), so old fixtures see every row; true in production). The Models category goes with them. The page has 29 rows, was 37. The code and the config keys stay. Command line: an interactive start with one of 21 flags (--allow, --deny, --verbatim, --output-format, --include-partial-messages, --json-schema, --reasoning-effort, --rules, --system-prompt-override, --worktree, --worktree-ref, --restore-code, --no-plan, --no-subagents, --agent, --agents, --tools, --disallowed-tools, --max-turns, --disable-web-search, --oauth) prints "error: zypi did not start." with one line for each flag (its reason and the way out) and exits with status 2, before it starts anything (pi-pager-bin/src/interactive_flags.rs). -p, the subcommands and the hidden compatibility flags do not change. 19 of the flags are hidden from --help; --rules and --system-prompt-override stay, with "-p only", because -p passes them to the agent. Behaviour change: a script that starts an interactive zypi with one of these flags now fails. Tests: +5 in pi-pager (5,656), +10 in pi-pager-bin (31). One test pins the table and --help against each other. The ratchets in scripts/tui_baseline.toml go up by the same numbers. CHANGELOG.md: two entries under [Unreleased].
zy1233
changed the base branch from
main
to
test/tui-pty-settings-flags-probes
October 31, 2026 02:50
zy1233
force-pushed
the
fix/tui-dead-settings-and-flags
branch
from
October 31, 2026 02:51
67e1d5c to
8ed04c7
Compare
This was referenced Oct 31, 2026
Owner
Author
|
Stack #66, bottom to top: #58, #59, #56, #57, #60, #61, #62, #63, #64, #65. One atomic squash merge ( Position 5 of 10. Base: |
This was referenced Oct 31, 2026
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
Acts on the two probes of #57 (plan decisions 8 and 14). An interactive
zypipasses the Python agent no flag, and the agent ignores what goes over the ACP wire except the model and the yolo switch. So a part of the settings page and of--helpdid nothing, and--denygave a false sense of safety (the agent still asked about a call that matched the rule, and never refused it). Now the page does not offer what changes nothing, and the start refuses what the agent does not back, with the reason. Python is not changed.main() parse_cli() dispatch_python_print() # -p keeps its own contract: it warns, it does not refuse dispatch_version / doctor + refuse_interactive_flags() # only without -p and without a subcommand start the TUIThe eight settings:
remember_tool_approvals,default_selected_permission,default_model,toolset.ask_user_question.timeout_enabled,fork_secondary_model,prompt_suggestions,hunk_tracker_mode,auto_update. The Models category goes with them. The code and theconfig.tomlkeys stay:default_selected_permission = "reject"still selects "Reject" in the first prompt (the one value that has an effect).The 21 flags (the 19 hidden ones are also gone from
--help):--allow,--deny,--verbatim,--output-format,--include-partial-messages,--json-schema,--reasoning-effort,--rules*,--system-prompt-override*,--worktree,--worktree-ref,--restore-code,--no-plan,--no-subagents,--agent,--agents,--tools,--disallowed-tools,--max-turns,--disable-web-search,--oauth. (*-ppasses these two to the agent, so they stay in--help, with "-p only".) The hidden compatibility flags (--trust,--no-ask-user,--hunk-tracker-mode,--storage-mode, ...) stay accepted.Evidence
Built from this branch (debug
zypi, Linux, WSL2), mock LLM, throw-away home. Before is the v0.7.0 binary with the probes of #57. After is the same probes against the new binary.Flags (
flags_probe.py, 63 cases):--deny: question still asked;--worktree: toast, then the main checkoutREFUSED, exit 2, one line with the reason (all 27 spellings run one by one, and all 21 in one start)-m,--cwd,--debug,--always-approvefamily,--permission-mode,--session-id, positional prompt, hidden compatibility flags-p hello --deny x --worktree w --max-turns 3--version --deny xSettings page (
settings_probe.py): 37 rows -> 29 rows; headers Appearance, Mouse, Editor & Input, Agent & Approval, Advanced (Models is gone). The permission question, the cursor row and[models].defaultgive the same results as before (Python and the wire are not touched).Tests
pi-pager: 5,656 passed, 12 skipped (+5: 3 inapp::agent_settings, 2 insettings_modal; one pins the 27 keys of the page with voice off).pi-pager-bin: 31 passed (+10: each flag found alone, other names, help order, message, table and--helpagree). Run withscripts/tui_baseline.py test(nextest).cargo check -p pi-pager -p pi-pager-bin --tests: no warning.tui_baseline.py gates: all pass (graph 970,leader243,x.ai297,grok agent0).smoke.py23/23,exit_matrix.py12/12,print_exit.pyok,resume_matrix.py16 PASS / 0 FAIL.ruff check .,ruff format --check .,scripts/tests(234 passed) on Windows.scripts/tui_baseline.tomlgo up by the same numbers (5,651 -> 5,656; 21 -> 31).CHANGELOG.md: two entries under[Unreleased].Merge Danger
Door: two-way. One revert brings back the old behaviour; a flag that must work again is one entry less in
REFUSALS.Blast Radius: the start of an interactive
zypiand the settings page. Behaviour change: a script that starts an interactivezypiwith one of the 21 flags now fails with status 2 (before: the flag did nothing).-p, the subcommands, the hidden compatibility flags, the Python packages and the config keys do not change.Not in this PR (left as findings):
/model <name>still saves a[models].defaultthat the next start ignores;-m <unknown id>fails without a visible message;fork_secondary_modelwrites an xAI model id; the voice rows are xAI-only. The numbers indocs/baselines/tui.mdare not changed here or in the docs PR (#64): that file records CI runs onmain, so it gets the new numbers after the merge.