Summary
When specify init is run in an environment without an interactive TTY (an AI agent harness, CI, or any piped/captured stdin), initialization can hang indefinitely at an arrow-key selection prompt (select_with_arrows). The prompt waits for keypresses that will never arrive, renders nothing useful to the caller, and never times out.
The existing CLI flags do not cover this:
--script and other explicit option flags (--here, --integration, --ai) pre-answer their own questions, but any selection not covered by a flag still falls through to select_with_arrows — there is no flag that reaches every prompt.
--force suggests "proceed without asking", but it only suppresses confirmation-style prompts; it does not provide a default answer to selection prompts, so the hang is unreachable by --force too.
- There is no global
--non-interactive / --defaults mode, and no TTY detection: with stdin not a TTY, the tool still enters the interactive selector instead of failing fast.
Reproduction
- Run
specify init --here --integration claude --force (or any invocation that leaves at least one selection unanswered by flags) with stdin/stdout not attached to a TTY — e.g. piped, under CI, or driven by an agent harness.
- Initialization reaches the first selection that has no corresponding flag and blocks in
select_with_arrows waiting for arrow-key input.
- No timeout, no error, no output indicating what is being asked — from the caller's side the process simply hangs.
Expected behavior (any of these would resolve it)
- Fail fast when non-interactive: if stdin is not a TTY and a selection has no flag-supplied answer, exit with a clear error naming the missing option and the flag that would supply it — instead of blocking on keyboard input.
- A
--non-interactive (or --defaults) mode that answers every selection with its documented default, and errors loudly on any selection that has no safe default.
- Flag coverage for every
select_with_arrows prompt, so a fully scripted init is expressible — at which point --force + explicit flags genuinely means "no prompts".
Why it matters
Spec Kit is a natural fit for agent-driven workflows, and those are precisely the environments with no TTY. Today a scripted specify init is not reliably expressible: whether it completes depends on whether the chosen flag combination happens to pre-answer every prompt, and when it doesn't, the failure mode is a silent hang rather than an actionable error.
Environment
specify 0.16.3.dev0
- Invoked non-interactively (AI agent harness; stdin not a TTY)
- Workaround used: ran the interactive selection out-of-band and supplied every flag the CLI exposes; the remaining prompt(s) had to be avoided rather than answered.
Summary
When
specify initis run in an environment without an interactive TTY (an AI agent harness, CI, or any piped/captured stdin), initialization can hang indefinitely at an arrow-key selection prompt (select_with_arrows). The prompt waits for keypresses that will never arrive, renders nothing useful to the caller, and never times out.The existing CLI flags do not cover this:
--scriptand other explicit option flags (--here,--integration,--ai) pre-answer their own questions, but any selection not covered by a flag still falls through toselect_with_arrows— there is no flag that reaches every prompt.--forcesuggests "proceed without asking", but it only suppresses confirmation-style prompts; it does not provide a default answer to selection prompts, so the hang is unreachable by--forcetoo.--non-interactive/--defaultsmode, and no TTY detection: with stdin not a TTY, the tool still enters the interactive selector instead of failing fast.Reproduction
specify init --here --integration claude --force(or any invocation that leaves at least one selection unanswered by flags) with stdin/stdout not attached to a TTY — e.g. piped, under CI, or driven by an agent harness.select_with_arrowswaiting for arrow-key input.Expected behavior (any of these would resolve it)
--non-interactive(or--defaults) mode that answers every selection with its documented default, and errors loudly on any selection that has no safe default.select_with_arrowsprompt, so a fully scripted init is expressible — at which point--force+ explicit flags genuinely means "no prompts".Why it matters
Spec Kit is a natural fit for agent-driven workflows, and those are precisely the environments with no TTY. Today a scripted
specify initis not reliably expressible: whether it completes depends on whether the chosen flag combination happens to pre-answer every prompt, and when it doesn't, the failure mode is a silent hang rather than an actionable error.Environment
specify0.16.3.dev0