[BUG] --output-format stream-json mode can not be terminated using ctrl + c

Resolved 💬 3 comments Opened Mar 8, 2026 by key4ng Closed Mar 12, 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?

When run claude --dangerously-skip-permissions --verbose --output-format stream-json -p "say hello" 2>&1 | head -5
If I want to terminate it using ctrl + c, it doesn't work until the tool loop completed

What Should Happen?

It should be terminated right away

Error Messages/Logs

n/a

Steps to Reproduce

claude --dangerously-skip-permissions --verbose --output-format stream-json -p "say hello" 2>&1 | head -5 and type ctrl + c

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.71 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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