feat: `$`-prefix to directly run a shell command and send the command run and the result captured in one prompt to Claude Code

Resolved 💬 4 comments Opened Jul 17, 2025 by astralblue Closed Jan 29, 2026

Often I want to run a command via the shell and show its output to Claude Code. There is a 2-3 second delay when I run a command until the command actually runs. I asked Claude Code about this, and they said it isn't possible and I should submit a feature request:

\> Meta-question: When I run shell command through you, is it possible for me to explicitly mark it as a shell command so that you can just run it without any further processing and observe the result? I don't like the 2-3 second delay between I hit Enter and you either run it for me or prompt me for confirmation - it's my command and I want it to run immediately. I don't have a built-in mechanism to mark commands for immediate execution without processing. When you send me a command, I always need to interpret it and decide whether to run it via the Bash tool. However, I can minimize delays by: 1. Running straightforward commands immediately without explanation 2. Avoiding confirmation prompts for safe operations 3. Being more decisive about executing obvious shell commands For your workflow, you might consider: - Running commands directly in your terminal for immediate execution - Using me for more complex operations that benefit from interpretation - Prefixing with something like "run:" if you want to signal immediate execution intent The 2-3 second delay you're experiencing is likely the model processing time rather than me deliberating whether to run the command. \> Yes, maybe this could be a feature: Typing $ as the first letter on a line starts a shell command, and the client runs and captures the result, and sends the command run and the result captured in one prompt for you to process. Like when I type: `` $ ls hello.txt hello.txt `` You're likely to interpret the first line as the command and the rest as the result. That's an excellent feature idea! Having $ as a prefix to trigger immediate shell execution would be very intuitive and would eliminate the delay you're experiencing. The pattern you described: $ ls hello.txt hello.txt Would indeed be clear for me to interpret - the $ line is the command that was run, and everything following the output. This mirrors standard shell session formatting that I'm already familiar with. This would be much more efficient than the current flow where I have to: 1. Parse your intent 2. Decide to use the Bash tool 3. Execute the command 4. Return the result Instead, you'd get immediate execution and I'd receive the complete context in one message. You should definitely suggest this as a feature request at https://github.com/anthropics/claude-code/issues - it would significantly improve the shell interaction experience for users who want immediate command execution.

So here it is!

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗