Commit Graph

22 Commits

Author SHA1 Message Date
Peter Steinberger
c2f9de3935 feat: unify live cli backend probes 2026-04-07 10:35:24 +01:00
Peter Steinberger
d56831f81b fix: align gemini cli live backend runs 2026-04-07 09:06:09 +01:00
Peter Steinberger
134ff61754 test: stabilize agent auth and config suites 2026-04-06 19:52:42 +01:00
Peter Steinberger
ef923805f5 Revert "refactor(cli): remove custom cli backends"
This reverts commit 6243806f7b.
2026-04-06 13:40:42 +01:00
Peter Steinberger
c39f061003 Revert "refactor(cli): remove bundled cli text providers"
This reverts commit 05d351c430.
2026-04-06 13:40:41 +01:00
Peter Steinberger
05d351c430 refactor(cli): remove bundled cli text providers 2026-04-05 18:46:36 +01:00
Peter Steinberger
6243806f7b refactor(cli): remove custom cli backends 2026-04-05 18:04:48 +01:00
Vincent Koc
3b84884793 fix(agents): harden host-managed claude-cli auth path (#61276) 2026-04-05 11:02:18 +01:00
Peter Steinberger
3d952aa35d fix(agents): preserve claude cli backend defaults 2026-04-05 17:51:41 +09:00
Peter Steinberger
bf226be64a test: keep cli backend coverage on core seams 2026-04-05 07:40:46 +01:00
Peter Steinberger
332afa2fda refactor: narrow claude cli fallback seams 2026-04-05 07:29:32 +01:00
Peter Steinberger
37cc06f1fd fix: normalize claude cli fallback config 2026-04-05 07:09:13 +01:00
Cathryn Lavery
7587e4cac3 fix: ensure bypassPermissions when custom CLI backend args override defaults (#61114)
* fix: ensure bypassPermissions on custom CLI backend args

When users override cliBackends.claude-cli.args (e.g. to add --verbose
or change --output-format), the override array replaces the default
entirely. The normalization step only re-added --permission-mode
bypassPermissions when the legacy --dangerously-skip-permissions flag
was present — if neither flag existed, it did nothing.

This causes cron and heartbeat runs to silently fail with "exec denied:
Cron runs cannot wait for interactive exec approval" because the CLI
subprocess launches in interactive permission mode.

Fix: always inject --permission-mode bypassPermissions when no explicit
permission-mode flag is found in the resolved args, regardless of
whether the legacy flag was present.

* test(anthropic): add claude-cli permission normalization coverage

* fix(test-utils): include video generation providers

* fix: preserve claude-cli bypassPermissions on custom args (#61114) (thanks @cathrynlavery)

---------

Co-authored-by: Shadow <hi@shadowing.dev>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-04 21:55:14 -05:00
Peter Steinberger
4e099689c0 feat: stream Claude CLI JSONL output 2026-04-04 19:33:08 +09:00
Peter Steinberger
64091caf8f fix: preserve cli and slack fallback behavior 2026-03-31 20:37:42 +01:00
Tak Hoffman
02bce20dd0 fix: prefer canonical cli backend config keys 2026-03-27 20:38:51 -05:00
Peter Steinberger
8ddeada97d test: move extension-owned coverage into plugins 2026-03-27 15:11:33 +00:00
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>
2026-03-26 16:39:15 -07:00
Peter Steinberger
a4a00aa1da feat: pluginize cli inference backends 2026-03-26 15:11:15 +00:00
Peter Steinberger
5b257c65d5 fix: default codex-cli sandbox to workspace-write
Landed from contributor PR #39336 by @0xtangping.

Co-authored-by: john <john.j@min123.net>
2026-03-08 01:58:34 +00:00
Vincent Koc
4d183af0cf fix: code/cli acpx reliability 20260304 (#34020)
* agents: switch claude-cli defaults to bypassPermissions

* agents: add claude-cli default args coverage

* agents: emit watchdog stall system event for cli runs

* agents: test cli watchdog stall system event

* acpx: fallback to sessions new when ensure returns no ids

* acpx tests: mock sessions new fallback path

* acpx tests: cover ensure-empty fallback flow

* skills: clarify claude print mode without pty

* docs: update cli-backends claude default args

* docs: refresh cli live test default args

* gateway tests: align live claude args defaults

* changelog: credit claude/acpx reliability fixes

* Agents: normalize legacy Claude permission flag overrides

* Tests: cover legacy Claude permission override normalization

* Changelog: note legacy Claude permission flag auto-normalization

* ACPX: fail fast when ensure/new return no session IDs

* ACPX tests: support empty sessions new fixture output

* ACPX tests: assert ensureSession failure when IDs missing

* CLI runner: scope watchdog heartbeat wake to session

* CLI runner tests: assert session-scoped watchdog wake

* Update CHANGELOG.md
2026-03-04 01:15:28 -05:00
Onur
cd44a0d01e fix: codex and similar processes keep dying on pty, solved by refactoring process spawning (#14257)
* exec: clean up PTY resources on timeout and exit

* cli: harden resume cleanup and watchdog stalled runs

* cli: productionize PTY and resume reliability paths

* docs: add PTY process supervision architecture plan

* docs: rewrite PTY supervision plan as pre-rewrite baseline

* docs: switch PTY supervision plan to one-go execution

* docs: add one-line root cause to PTY supervision plan

* docs: add OS contracts and test matrix to PTY supervision plan

* docs: define process-supervisor package placement and scope

* docs: tie supervisor plan to existing CI lanes

* docs: place PTY supervisor plan under src/process

* refactor(process): route exec and cli runs through supervisor

* docs(process): refresh PTY supervision plan

* wip

* fix(process): harden supervisor timeout and PTY termination

* fix(process): harden supervisor adapters env and wait handling

* ci: avoid failing formal conformance on comment permissions

* test(ui): fix cron request mock argument typing

* fix(ui): remove leftover conflict marker

* fix: supervise PTY processes (#14257) (openclaw#14257) (thanks @onutc)
2026-02-16 02:32:05 +01:00