Terminal probe queries now wait for input to be attached before writing, closing a race with barrier writes
Claude Code sends small queries to the terminal to detect things like its color theme or version. These queries now wait until the terminal's input stream is confirmed attached (setInputAttached(true)) before they are actually written, instead of writing immediately. A related 'barrier' write used during resync is now gated the same way, and cancelling a pending query now correctly reports failure instead of silently appearing to succeed.
This avoids sending terminal queries before the terminal is actually ready to receive them, which could previously cause queries to be lost or to appear to succeed when they had not.