claude_cli spawns one process per turn #224

Open
opened 2026-11-21 12:36:59 +00:00 by johannes · 0 comments
Owner

Location: crates/hx-ai/src/claude_cli.rs (module)
What is hacky: each hx turn starts a new claude process continued with --resume, paying startup latency.
Proper fix: keep a long-lived process using --input-format stream-json.
Original comment: "ponytail: one claude process per hx turn, continued with --resume; add a long-lived --input-format stream-json process if startup latency hurts."

Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).

Location: crates/hx-ai/src/claude_cli.rs (module) What is hacky: each hx turn starts a new `claude` process continued with `--resume`, paying startup latency. Proper fix: keep a long-lived process using `--input-format stream-json`. Original comment: "ponytail: one `claude` process per hx turn, continued with `--resume`; add a long-lived `--input-format stream-json` process if startup latency hurts." Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).
johannes added the ai label 2026-11-21 12:36:59 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#224