Skip to content

fix(agents): preserve empty CLI subagent completions - #126379

Merged
steipete merged 5 commits into
mainfrom
steipete/f1-steady-fixes
Aug 19, 2026
Merged

steipete merged 5 commits into
mainfrom
steipete/f1-steady-fixes

Conversation

@steipete

@steipete steipete commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where a spawned CLI-backed subagent that completed successfully without assistant text was misclassified as an empty_response, even though the embedded runtime already treats the same subagent-lane outcome as an intentional silent completion.

This PR also removes the retired Matrix ACP/subagent taxonomy leaf whose scenario moved to channels.native-threads, and folds in small same-invariant ownership cleanup around SQLite busy timeouts, record coercion, filesystem containment imports, and A2UI request/response types.

Why This Change Was Made

Spawn launch already records lane: subagent; attempt execution now computes that fact once and gives both CLI and embedded runtimes the same optional-terminal-reply policy. Ordinary CLI turns still receive no permit and retain the generic runner's empty_response rejection.

The cleanup keeps one owner per primitive: temporary SQLite timeout/restoration policy stays in sqlite-busy-timeout, generic record coercion uses the canonical or dependency-light seam, path containment imports use file-access-runtime, and the A2UI route owns its HTTP boundary types. Connection-local timeout restoration and lease lock-failure reporting remain unchanged.

User Impact

CLI-backed child agents can finish successfully with no final text without triggering a false failover. Normal CLI conversations still reject empty responses, and the remaining changes are behavior-preserving maintenance and QA inventory cleanup.

Evidence

  • Pre-fix regression: attempt-execution.cli.test.ts failed only the subagent case (expected true, received false); the ordinary case already received false.
  • Post-fix agent composition: 119/119 passed. Existing CLI runner reliability coverage still proves unpermitted whitespace rejects and explicitly permitted whitespace returns the silent token.
  • SQLite owner suite: 3 files, 49/49 passed, covering timeout restoration, WAL retry ordering, lease acquire/renew/release, and exit cleanup.
  • Fold-in owner/sibling proof: 10 routed Vitest shards, 311 passed and 48 skipped by existing gates.
  • Taxonomy schema validation passed; qa coverage --json confirms no matrix.acp-subagent-spawn-hooks validation issue and preserves inventoried channels.native-threads coverage.
  • node scripts/check-changed.mjs: passed all lanes, including core/UI/extension/script/test typechecks, lint, dead exports, deprecated API usage, database-first guards, and Import cycle check: 0 runtime value cycle(s).
  • Exact-head CI run 32283571165 exposed that plugin-npm-runtime-build.mts also executes from isolated script copies without workspace package resolution. The fold-in now uses the dependency-light record-shared.mjs owner; the four directly affected tooling files pass 349/349.
  • Final Codex autoreview (--mode local): clean, no accepted/actionable findings (0.99 confidence).
  • ClawSweeper current-head review: patch correct (0.96), security cleared, no technical P1/P2. Its P3 release-owned changelog finding was applied; the suggested rebase is skipped because the PR is mergeable and repository policy uses exact-head/test-merge proof instead of rebasing solely for behind-main drift.
  • pnpm maturity:render was not usable as local proof because it requires an all/release-profile qa-evidence.json artifact with a scorecard field. Source schema and actual coverage-report validation passed instead.
  • The optional broad test:changed resolver was not counted as proof: its all-tooling shard twice passed the visible CI/package/database tests, then hit the repository wrapper's 15-minute no-output watchdog. Exact-head PR CI remains the broad test authority.

Production LOC: +21/-54 (net -33; 12 pure import ownership moves discounted, raw +54/-83) | Tests: +35/-1 (net +34) | Tooling: +13/-17 (net -4) | Metadata: +3/-9 (net -6).

Per-item deltas:

  • CLI subagent fix: production +4/-4; tests +34/-0.
  • Retired taxonomy leaf and anchors: metadata +3/-8, including rubric wording and the stale category-note slug.
  • SQLite busy-timeout absorption: production +6/-34; assertion baseline +0/-1.
  • Fold-ins: judged production +11/-16; tooling +13/-17; containment import moves net 0.

@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete merged commit 3415519 into main Aug 19, 2026
232 of 234 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the steipete/f1-steady-fixes branch August 19, 2026 18:30
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
* fix(agents): preserve empty CLI subagent completions

* chore(qa): remove retired Matrix coverage leaf

* refactor: consolidate shared runtime ownership

* fix(scripts): keep runtime build coercion dependency-light

* chore: remove release-owned changelog entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant