feat(config): run the claude agents headless
`transport="stream_json"` puts them on `claude -p` with piped stdin instead of a pseudo-tty. The pi is the machine the PTY path hurt most: seconds per spawn waiting for an Ink render loop to settle — which is why `startup_delay` had crept to 60s — and the occasional prompt lost to a swallowed paste. Neither failure mode has an analogue on a pipe. `include_partial_messages` comes with it, so Anthropic-API clients get token-level SSE rather than one delta per finished block. Drops `--remote-control`: it only means anything for an interactive session, and the transport would strip it anyway.
This commit is contained in:
@@ -95,7 +95,19 @@ def claude(name: str, model: str, effort: str | None = None) -> ClaudeAgent:
|
||||
cwd=VAULT,
|
||||
options=ClaudeCodeOptions(
|
||||
effort=effort,
|
||||
extra_args=("--remote-control",),
|
||||
# Headless `claude -p` instead of driving the TUI over a
|
||||
# pseudo-tty. The pi is exactly the machine the PTY path hurt
|
||||
# most: it spent seconds per spawn waiting for an Ink render
|
||||
# loop to settle (hence startup_delay creeping to 60s) and
|
||||
# occasionally lost a prompt to a swallowed paste. Piped
|
||||
# stdin has neither problem, and gives us token streaming.
|
||||
#
|
||||
# Dropped with it: `--remote-control`, which only exists for
|
||||
# interactive sessions, and the admin terminal's ability to
|
||||
# type into a stuck session by hand — the failure mode that
|
||||
# was for is what this transport removes.
|
||||
transport="stream_json",
|
||||
include_partial_messages=True,
|
||||
disallowed_tools=("AskUserQuestion", "ExitPlanMode", "EnterPlanMode"),
|
||||
),
|
||||
expose_mcps=(
|
||||
|
||||
Reference in New Issue
Block a user