Skip to content

interactive-command blocker suggests POSIX-only commands (cat/head/tail/ps aux) on Windows #413

Description

@PierrunoYT

Bug description

DetectInteractiveCommand (internal/sandbox/safe_command.go) correctly blocks interactive programs (pagers, process monitors, tail -f, etc.) before they hang the non-interactive agent — but the remediation text it returns hardcodes POSIX-only alternatives regardless of platform: pagers (less/more/most) suggest cat/head/tail -n N; process monitors (top/htop/btop/btm) suggest ps aux; tail -f suggests tail -n N <file>. None of cat/head/tail/ps exist on Windows cmd.exe (which is what Zero's bash tool actually executes through on Windows — see #411/#412), so the block correctly stops the interactive command but then points the model at three more commands it also can't run.

Reproduction (observed in the wild)

On Windows, run something like:

type blame_out.txt | more +0

Zero blocks more (correct — it's an interactive pager) but returns: "Use cat, head, or tail -n N to print file contents non-interactively." None of those exist on Windows.

Expected behavior

The suggestion should be platform-appropriate: type <file> (or Zero's own read_file tool) instead of cat/head/tail, tasklist instead of ps aux, etc.

Activity

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

    issue-approvedReviewed and approved by the core team; community PRs may implement this issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions