Generated heredoc pipe commands leave zsh waiting for input indefinitely
Before opening, please confirm:
- [x] I have searched for duplicate or closed issues
Operating System
macOS 26.2
Kiro Version
0.8.0
Bug Description
When Kiro generates shell commands that use heredoc pipe syntax (like cat << 'EOF' | command), the terminal in zsh waits for input indefinitely instead of executing the command. The shell thinks the user hasn't finished entering their command and displays a continuation prompt, leaving the user stuck.
This requires creating steering rules as a workaround to guide Kiro to use zsh-compatible command patterns instead. Since I suspect this is a model limitation, a simple fix that doesn't involve adding to the prompt would be to just have Kiro call up bash instead of the user's default shell, which, on Macs, is zsh.
Steps to Reproduce
- Open Kiro on macOS with zsh as the default shell
- I am not ever asking Kiro to generate a shell command that uses heredoc pipe syntax. Rather, it does this itself
Example problematic command pattern: cat << 'EOF' | bun -e "console.log('hello')" console.log('hello') EOF
Expected Behavior
Kiro should generate zsh-compatible shell commands that execute immediately, such as:
- Writing to a temporary file first:
echo "console.log('hello')" > /tmp/temp.js && bun /tmp/temp.js - Using alternative syntax that works in zsh
- Or detecting the user's shell and adapting command generation accordingly
Conversation ID
No response
Additional Context
No response
Hey @jbearak, Thank you for reporting this issue. I have been unable to reproduce the problem based on the description provided. Could you please share a screenshot of the issue you are experiencing? This will help me better understand the situation and investigate further.
I was able to reproduce it by typing:
Here is the last example I have when this occurred (it's the only time I took a screenshot). I pasted these images into Claude to try and fix it, and to produce this bug report:
It suggested I add the steering rule, and since pasting it, this issue has not recurred.
Just noting that this bug no longer happens, so closing this
I am seeing problems in heredoc still (on MacOS, using the Kiro IDE (0.9.40)). For instance the command below just hanged for me forever in "Working..."
cat > /tmp/fix_tests.sh << 'EOF'
#!/bin/bash
file="internal/reload/coordinator_test.go"
# Use perl for in-place editing
perl -i -pe 's/configMgr := &mockConfigManager\{\}/configMgr := newMockConfigManager(nil)/g' "$file"
EOF
chmod +x /tmp/fix_tests.sh
/tmp/fix_tests.sh
The file is generated in /tmp/ and it appears to be chmodded, but the command remains in Working...
I have seen it happen several times (and all the time it seems like it involves generating file content using heredoc) and the only way to solve it is to cancel the execution and start again.
It suggested I add the steering rule, and since pasting it, this issue has not recurred.
What type of steering rule? What is it that you are telling Kiro to avoid? I am seeing this happening as well with heredoc usage on MacOS but I don't understand from your screen shots what it actually is that you are telling Kiro to avoid doing.
Cheapest Anthropic & OpenAI-Compatible API 🚀
Works with Claude Code, Cursor, Cline, Void, Continue, Kilo Code, OpenClaw, OpenCode, LangChain, Obsidian, IntelliJ — any OpenAI-compatible client.
💰 Pricing (1 credit ≈ $1 original Anthropic)
| Credits | Price | Tokens |
|---|---|---|
| 1k | $5 | ~100M |
| 5k | $15 | ~500M |
| 10k | $30 | ~1B |
🤖 Models: claude-opus-4-6 / sonnet-4-6 / haiku-4-5 (1M ctx + websearch)
✅ Why us?
- 100 trial credits before payment
- Credits issued before payment
- Any country, any payment method
- 400+ clients, quality guarantee
- We can prove Opus is real and explain pricing
📩 Telegram: @yon_sup