[BUG] bash-input prefill/tab-completion suggests relative-path script without required ./ prefix

Status Open
Reported on v2.1.234
Maintainer reply None cached
Activity 1 comment · opened Aug 17, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The bash-input command prefill/tab-completion suggests running a local script by its bare relative filename (e.g. push.sh) instead of ./push.sh. Accepting/running the suggested command fails immediately with "command not found", since the script isn't on $PATH and POSIX shells require an explicit ./ (or full path) to execute a file in the current directory when it's not on $PATH.

What Should Happen?

The suggested/completed command should be directly runnable as offered. For a local script detected in the current working directory, the prefill should include the ./ prefix (or otherwise resolve to a command that actually executes), matching what a manually-typed !-prefixed shell command would require.

Error Messages/Logs

$ push.sh
(eval):1: command not found: push.sh

Steps to Reproduce

  1. In a project directory containing an executable script that isn't on $PATH, e.g. push.sh (chmod +x)
  2. Use the bash-input entry method's command prefill/tab-completion to reference that script
  3. Accept the suggested completion — it fills in as push.sh, without a ./ prefix
  4. Run the accepted command
  5. Observe: fails immediately with "command not found: push.sh"

Expected: the suggestion should either include ./ or otherwise resolve to a command that actually executes.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.234 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Observed while using Claude Code's bash-input UI element inside an agent/chat-driven session (not a raw interactive terminal invocation) — flagging in case that context matters for reproduction. Searched existing issues first; closest related but not matching: #15848 ("Tab completion broken for ! prefix bash commands" — describes Tab doing nothing after !, which is a different symptom) and #71458 (docs-only, closed). Filed this as a new report since neither covers a prefill/completion that IS offered but resolves to a non-executable command.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗