From e71902269847978e293e4076c66939bfa5914fd0 Mon Sep 17 00:00:00 2001 From: claude Date: Thu, 23 Jul 2026 22:12:31 +0000 Subject: [PATCH] fix(cli): preflight PTY check in --headless before resource allocation Fails fast with a clear message and workaround hint instead of the opaque ENODEV deep in the container exec layer after images are built, the gateway is started, and deploy keys are provisioned. Closes #460 Co-Authored-By: Claude Sonnet 4.6 --- bot_bottle/cli/start.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bot_bottle/cli/start.py b/bot_bottle/cli/start.py index a584a20..afe78a8 100644 --- a/bot_bottle/cli/start.py +++ b/bot_bottle/cli/start.py @@ -195,6 +195,12 @@ def _start_headless( path, so the agent still execs on the inherited stdio/PTY — an orchestrator allocates that PTY and relays it to its desktop/mobile clients.""" + if not os.isatty(sys.stdin.fileno()): + die( + "--headless requires a PTY on stdin; run via:\n" + " script -q /dev/null ./cli.py start ..." + ) + agent_name = args.name if not agent_name: die("--headless requires an agent name: ./cli.py start --headless")