[BUG] First prompt lost in new project directory — trust prompt consumes the input, user must type it twice
Problem
When launching claude --dangerously-skip-permissions in a project directory for the first time, the workspace trust prompt appears. The user's first prompt is consumed by (or submitted alongside) the trust acceptance — it never reaches Claude. The user has to type their prompt a second time.
Steps to Reproduce
- SSH into a fresh server with Claude Code installed
cd ~/dev/some-new-project(a directory Claude has never seen)claude --dangerously-skip-permissions- Type a prompt and press Enter
- The trust dialog appears and is accepted, but the prompt is lost
- The user must type the prompt again
Expected Behavior
After the trust prompt is accepted, the first prompt should be submitted to Claude — not discarded. Alternatively, the trust prompt should appear before the input prompt, so the user never types into a prompt that gets consumed.
Actual Behavior
The first prompt is silently consumed. The user sees an empty prompt and has to retype their message.
Context
This is particularly problematic for programmatic/automated session launches (e.g. via tmux send-keys) where a tool sends the first prompt immediately after launch. The prompt is lost and the session sits idle waiting for input.
Environment
- OS: Ubuntu 24.04 LTS (Hetzner VPS)
- Claude Code: Latest (npm install -g @anthropic-ai/claude-code)
- Launch method:
claude --dangerously-skip-permissionsin a tmux pane
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗