You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UX: default tool-discipline prompt + honest --allow semantics in help #103
A UX audit (2026-09-19, live E2E) showed the model bypassing the file-tool lane: asked to write_file, glm-5.3-flash instead called run_command with a bash -c 'cat > file' heredoc. Consequences:
--allow 'write_*' silently does not cover the bypass lane — the user who pre-approves write tools still gets a second approval prompt (or, worse, believes writes are gated when they happen through run_command).
The bypass also skips the file tools' path jail and hash-anchored editing guarantees.
Root cause is prompt-side: the default system prompt (when the host supplies none) never tells the model to prefer the dedicated file tools over run_command for file operations, and the --allow help oversells coverage ("Auto-allow Write tools matching this glob" — true per-tool, but the equivalent-op tool exists outside any write_* pattern).
Proposed fix (one PR)
Default tool-discipline guidance in the host's default system prompt (tole-cli, build_registry/session creation path — only when no explicit --system/env prompt is set): add a short, deterministic instruction block — prefer read_file/write_file/edit_file/delete_file for file operations; use run_command only for what those cannot do (pipes, builds, git/gh beyond the dedicated tools). Keep it a few lines; core stays prompt-agnostic (the harness must work with any system prompt — this only changes the CLI's default).
Honest --allow help: state that allowlist patterns match tool names only, that equivalent-effect tools (e.g. run_command) are separately gated, and that Destructive is never auto-allowed. Same wording on run/resume/chat help.
Acceptance criteria
Live E2E (glm-5.3-flash via Bifrost): "create hello.txt using the write_file tool" produces a write_file intent, not a run_command bypass (assert on the session log's tool name).
With --allow 'write_*', the same mission completes with zero approval prompts; without it, exactly one prompt for write_file and none via bypass.
Both profiles (default + --no-default-features) still pass the full suite.
Activity
feat: default tool-discipline prompt + honest --allow semantics (#103) (