Skip to content

Make the "do NOT use Bash for file operations" rule explicit about batch file operations #175

Description

@mdev34-lab

The current system-prompt rule against using Bash for file operations is too broad and is being interpreted literally by weaker models.

Models such as Nex-N2.5-Pro may avoid Bash even when a single Bash invocation is clearly the efficient tool for a file operation, and instead perform many manual tool calls. This wastes context and increases latency.

The rule should distinguish between:

  • Bash as a general-purpose file-editing substitute: still discourage/forbid this where AlphaCode has a dedicated file operation tool.
  • Bash for bulk, recursive, scripted, or naturally shell-native file operations: explicitly allow it when one command can perform the operation more efficiently than many individual tool calls.
  • Multiple independent file operations: prefer one batched Bash invocation over repeated manual operations when the operation is safe and deterministic.
  • Inspection/search commands: continue to allow/readily prefer Bash where appropriate (e.g. find, rg, git, wc, stat, etc.).
  • Dedicated file tools: use them for targeted edits where they are the better semantic fit; do not force models to avoid Bash at the cost of dozens of equivalent calls.

The prompt should include concrete examples so literal models cannot interpret "do NOT use Bash for file operations" as "never use Bash to touch files under any circumstances."

Acceptance criteria:

  • Replace the ambiguous blanket wording with an explicit decision rule.
  • State when Bash is preferred for bulk/batched/recursive file operations.
  • State when dedicated file tools are preferred.
  • Include at least 2-3 concrete examples of valid Bash use for file operations.
  • Avoid wording that encourages models to turn a one-command operation into a sequence of manual tool calls.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions