[FEATURE] --prefill flag to pre-fill input box without sending
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 0 comments · opened Aug 19, 2026
Problem
When launching claude with a positional prompt argument, the text is sent immediately as the first message. There's no way to pre-fill the input box with text and let the user edit/confirm before sending.
Use case
Shell aliases that launch Claude Code with project context pre-loaded:
cc_zontra() {
cd ~/Projects/workspace && claude --prefill "Project: ~/Projects/zontra"
}
cc_ai_guardrails() {
cd ~/Projects/workspace && claude --prefill "Project: ~/Projects/ai_guardrails"
}
The user types cc_zontra, Claude Code opens with the text already in the input box, and the user appends their actual request before hitting Enter. This avoids burning a turn on a context-only message and lets users build project-specific launcher aliases.
Proposed solution
A --prefill <text> flag (or --initial-text) that places text in the input box without submitting it. The user sees it on launch, can edit or append to it, and sends when ready.
Current workarounds
- Positional
promptarg: sends immediately, wastes a turn osascriptkeystroke simulation: fragile, timing-dependent, breaks in tmux/SSH, requires accessibility permissions--append-system-prompt: invisible to user, can't be edited per-invocation
None are satisfactory.