Skip to content

UX: default tool-discipline prompt + honest --allow semantics in help #103

Closed

Description

@ajianaz

Problem

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:

  1. --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).
  2. 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)

  1. 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).
  2. 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions