Commit Graph

9 Commits (4329d94de3a71803db177ee50af68eb75d7ea06b)

Author SHA1 Message Date
Peter Steinberger 0af808b457
test: add cli backend live matrix metadata 8 months ago
Peter Steinberger af62a2c2e4
style: fix extension lint violations 8 months ago
Peter Steinberger ef923805f5
Revert "refactor(cli): remove custom cli backends"
This reverts commit 6243806f7b.
8 months ago
Peter Steinberger 2d7157b424
refactor(cli): delete removed backend files 8 months ago
Vincent Koc 3b84884793
fix(agents): harden host-managed claude-cli auth path (#61276) 8 months ago
Peter Steinberger 4e099689c0
feat: stream Claude CLI JSONL output 8 months ago
Peter Steinberger 48ae976333
refactor: split cli runner pipeline 8 months ago
felear2022 623f4d3056 fix: use stream-json output for Claude CLI backend to prevent watchdog timeouts
The Claude CLI backend uses `--output-format json`, which produces no
stdout until the entire request completes. When session context is large
(100K+ tokens) or API response is slow, the no-output watchdog timer
(max 180s for resume sessions) kills the process before it finishes,
resulting in "CLI produced no output for 180s and was terminated" errors.

Switch to `--output-format stream-json --verbose` so Claude CLI emits
NDJSON events throughout processing (init, assistant, rate_limit, result).
Each event resets the watchdog timer, which is the intended behavior —
the watchdog detects truly stuck processes, not slow-but-progressing ones.

Changes:
- cli-backends.ts: `json` → `stream-json --verbose`, `output: "jsonl"`
- helpers.ts: teach parseCliJsonl to extract text from Claude's
  `{"type":"result","result":"..."}` NDJSON line

Note: `--verbose` is required for stream-json in `-p` (print) mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8 months ago
Peter Steinberger a4a00aa1da
feat: pluginize cli inference backends 8 months ago