Skip to content

fix(inquirerer): apply inactivity timeout to all environments, not just non-TTY#91

Merged
pyramation merged 1 commit into
mainfrom
fix/timeout-tty-guard
Jun 28, 2026
Merged

fix(inquirerer): apply inactivity timeout to all environments, not just non-TTY#91
pyramation merged 1 commit into
mainfrom
fix/timeout-tty-guard

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

The PromptTimeoutError inactivity timeout (added in #90) was gated behind !(input as any).isTTY, so it only fired in non-TTY environments (CI, pipes). Running a CLI from a real terminal without required arguments would show an interactive prompt and hang forever instead of timing out with usage info.

- } else if (!noTty && !(input as any).isTTY) {
+ } else if (!noTty) {
    this.timeout = DEFAULT_NON_TTY_TIMEOUT;

The reset-on-keypress design (setupInputActivityListener / resetInactivityTimeout) already handles active interactive users — the timer resets on every keystroke, so it only fires after 15s of complete inactivity. This makes it safe to enable universally.

Also updated formatTimeoutError messaging to be environment-agnostic (no longer says "non-interactive environment").

Link to Devin session: https://app.devin.ai/sessions/0742309126f34ef584e8dd827828d723
Requested by: @pyramation

…st non-TTY

The timeout was gated behind `!input.isTTY`, so it only fired in
non-TTY environments (CI, pipes). This meant running a CLI command
from a real terminal without required arguments would show an
interactive prompt instead of timing out with usage info.

Remove the isTTY guard so the timeout applies universally. The
reset-on-keypress design already protects interactive users — the
timer resets on every keystroke, so it only fires when nobody is
typing.
@pyramation pyramation self-assigned this Jun 28, 2026
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation pyramation merged commit 793da36 into main Jun 28, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant