
I investigated the automatic continuation setting (askUserQuestionTimeout) for waiting for responses in Claude Code
This page has been translated by machine translation. View original
Hello, I'm Tsukuboshi (tsukuboshi0755)!
Claude Code has a mechanism called AskUserQuestion, where the model asks the user multiple-choice questions during work.
While convenient, there was a frustration that if you stepped away while a question was displayed, the agent's work would remain paused until you answered.
So in this article, I'll introduce the askUserQuestionTimeout setting that allows you to automatically continue after a certain period of waiting for an answer!
What is askUserQuestionTimeout?
askUserQuestionTimeout is a configuration key that can be specified in Claude Code's settings.json.
When the AskUserQuestion dialog remains idle (without any interaction) for the specified amount of time, it automatically proceeds by adopting the currently pre-selected option at that point.
The main specifications are as follows.
| Item | Content |
|---|---|
| Configuration key | askUserQuestionTimeout |
| Default value | "never" (waits indefinitely for an answer) |
| Specifiable values | Time strings like "60s", "5m", "10m", or "never" |
| Configuration scope | User settings (~/.claude/settings.json) only |
| Required version | Claude Code v2.1.200 or later |
The default is "never", so if nothing is set, it will continue to wait for an answer as before.
How to Configure
Add it as a top-level key to the user settings file ~/.claude/settings.json.
{
"askUserQuestionTimeout": "5m"
}
In the above example, if the question dialog remains idle for 5 minutes, it will automatically continue with the pre-selected option.
Notes
Only Valid in User Scope
According to the official documentation, this setting is exclusively for user scope.
Please note that writing it in project settings (.claude/settings.json) or local settings (.claude/settings.local.json) will not be read.
Rather than enforcing it on the team's repository side, it is positioned as a setting that each user configures according to their own preferences.
The Auto-continued Option is the Currently Pre-selected One
The option adopted upon timeout is whichever option is selected in the dialog at that point.
Since there is a possibility of proceeding with an unintended choice, when entrusting long-running automated work, we recommend adjusting usage based on the nature of the work — such as setting a longer timeout value (e.g., "10m"), or keeping it as "never" for tasks where important decisions are anticipated.
References
In Closing
This time, I introduced the askUserQuestionTimeout setting that allows you to automatically continue after a certain period of waiting for an AskUserQuestion answer.
When using Claude Code for long autonomous tasks, hasn't everyone experienced the situation where work was stopped by a question while you were away?
By setting askUserQuestionTimeout, you can prevent work from remaining paused while waiting for an answer, making it a setting that pairs well with workflows where you hand off tasks to the agent and leave it running.
On the other hand, as you can tell from the default being "never", answering questions is fundamentally an important point that reflects the user's judgment.
Rather than relying too much on auto-continuation, it seems best to use different timeout values depending on the nature of the task.
I hope this article is helpful to someone!
That's all from Tsukuboshi (tsukuboshi0755)!