From 741d1a8526fb337607683ce8400b52d6545a8481 Mon Sep 17 00:00:00 2001 From: worldmozara Date: Mon, 26 Oct 2026 00:52:48 +0800 Subject: [PATCH] core/cli: keep the limit prompt line on the terminal Once the limit prompt offered its three answers as notification buttons, the read took the button path and skipped the prompt line the terminal used to print: the human at the terminal saw the reason and then an indefinite wait, with nothing saying what to type. It writes the line again, as every other prompt that reads both surfaces already does. --- src/plyngent/cli/limits.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plyngent/cli/limits.py b/src/plyngent/cli/limits.py index abf8bc3..1ea31d9 100644 --- a/src/plyngent/cli/limits.py +++ b/src/plyngent/cli/limits.py @@ -232,6 +232,11 @@ def _decide_continue_limit(reason: str) -> bool: else: # Same read as the timed confirms: stdin or the notification, # whichever answers first, with the terminal's default on silence. + # The prompt line still goes to the terminal: the buttons elsewhere + # do not say what typing here would do. + with contextlib.suppress(OSError): + _ = sys.stderr.write(_CONTINUE_PROMPT) + _ = sys.stderr.flush() token = (_read_answer(None, wait) or "").strip().lower() if not token: token = "y"