From a8c86a4292f9b1f603ea49010ceaac4aaf2246f4 Mon Sep 17 00:00:00 2001 From: h Date: Fri, 22 May 2026 00:36:27 +0200 Subject: [PATCH] feat: bump startup delay (new method) --- src/beaver_gateway/agents/claude.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/beaver_gateway/agents/claude.py b/src/beaver_gateway/agents/claude.py index 3e4a782..12ae427 100644 --- a/src/beaver_gateway/agents/claude.py +++ b/src/beaver_gateway/agents/claude.py @@ -153,9 +153,14 @@ class ClaudeCodeOptions(BaseModel): caveats) as ``UserMessage`` events. Off by default — they're not part of the real conversation.""" - startup_delay: float = 1.0 - """Seconds to wait after spawning the PTY before the first - write — claude's TUI takes a beat to settle.""" + startup_delay: float = 10.0 + """Upper bound (seconds) on waiting for claude's TUI to enable + bracketed-paste mode after spawn. claude-code-api polls PTY output + for the DECSET 2004 marker and returns as soon as it arrives; this + caps how long to wait if it never does. 10s by default is a free + headroom — on a fast host the marker arrives in well under a second + and we proceed immediately — but it saves slow hosts (Raspberry Pi + etc) where the TUI can take a few seconds to render.""" file_wait_timeout: float = 30.0 """How long to wait for the session JSONL to appear after spawn.