---
created: 2026-04-13T04:32:00.000Z
title: TCP spool timeout fallback for escaped AskUserQuestion
area: messaging
milestone: v1.6
files: []
---

## Problem

There is a unique edge case where `.idle-ready` is never created: when the user escapes an `AskUserQuestion` prompt. In this scenario, the Stop hook does not fire, so the normal idle-ready coordination path is never triggered. The agent appears busy (no `.idle-ready`), but is actually stuck waiting for input that will never come.

## Solution

When `.idle-ready` is not present and a TCP message arrives, start a 5-minute timeout. If the PreToolUse hook does not read from the spool during those 5 minutes, the listener should terminate with the read signal. This forces the agent to process the incoming message even in the escaped-AskUserQuestion edge case.

The timeout acts as a fallback — under normal operation the PreToolUse hook reads from the spool well within 5 minutes, so the timeout never fires.
