[BUG] Initial prompt displays twice when starting Claude Code with inline argument
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 starting Claude Code with an inline prompt (e.g., claude "Find tests that are redundant"), the initial prompt text is duplicated and displayed twice in the terminal. The prompt appears once at the top when entered, then the entire text is repeated again at the bottom of the terminal output before Claude begins processing. This duplication persists until the initial prompt is fully processed, after which the interface returns to normal behavior.
This issue only occurs when passing a prompt as a command-line argument at startup. It does not occur when starting Claude Code without arguments and then entering prompts interactively.
<img width="1248" height="914" alt="Image" src="https://github.com/user-attachments/assets/1f0253b5-78a9-48a8-89d7-29def605912f" />
What Should Happen?
When starting Claude Code with an inline prompt, the prompt should be displayed only once. The expected flow should be:
- User enters: claude "Find tests that are redundant"
- Prompt appears once at the top
- Claude begins processing immediately with status indicators
- No duplicate text appears at the bottom
Error Messages/Logs
No error messages are generated. The issue is purely visual - the prompt text is duplicated in the terminal output during the initial processing phase.
Steps to Reproduce
- Open a terminal
- Run Claude Code with an inline prompt: claude "Find tests that are redundant" (any prompt text will demonstrate the issue)
- Observe that the prompt text appears at the top
- Observe that the same prompt text is duplicated and appears again at the bottom of the terminal
- Wait for Claude to finish processing the initial prompt
- Observe that the duplication disappears and normal operation resumes
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.47
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗