Skip to content

fix(exec): keep pending approval warnings truthful#101561

Merged
steipete merged 2 commits into
mainfrom
codex/replay-78184-exec-approval-warning
Jul 7, 2026
Merged

fix(exec): keep pending approval warnings truthful#101561
steipete merged 2 commits into
mainfrom
codex/replay-78184-exec-approval-warning

Conversation

@steipete

@steipete steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Related: #78184

What Problem This Solves

Fixes an issue where users requesting background or yielded exec while the process tool was unavailable would see “running synchronously” inside a gateway or node approval-pending prompt, even though the command had not started.

Why This Change Was Made

This is a maintainer replay of the useful runtime portion of #78184. It keeps foreground-only warnings separate from approval-time warnings, adds them only once execution will actually run inline, and makes node completion rendering preserve the same warnings as gateway completion rendering.

The replay deliberately excludes the original Doctor repair that added process/edit grants to restricted profiles; that would silently broaden existing authorization policy. It also replaces the original blanket approval docs with the current contract: native gateway approval can wait inline, while node and non-native gateway approvals return pending and complete asynchronously.

User Impact

Pending approval cards now describe only the approval state and no longer imply that a command is already executing. If an approved or unguarded command truly falls back to foreground execution, the user still sees the background-disabled warning. No config, migration, protocol, or approval-authority surface changes.

Evidence

  • Testbox tbx_01kwy0fhy32t821vwnbe3exev3: pnpm test src/agents/bash-tools.exec.approval-id.test.ts src/agents/bash-tools.exec-foreground-failures.test.ts src/agents/bash-tools.exec-host-node.test.ts — 3 files, 95 tests passed.
  • Same Testbox: pnpm check:changed — selected core, coreTests, and docs; production/test typechecks, lint (0 warnings/errors), docs/policy guards, and import-cycle checks passed.
  • Same Testbox: scoped pnpm format:check — all 8 changed files correctly formatted.
  • Fresh Codex autoreview after formatting: clean, no accepted/actionable findings, correctness 0.93.
  • git diff --check passed at commit ae9f9e72f5f041fce5c7525b3f1dca8080a35b72.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Jul 7, 2026
…ec-approval-warning

# Conflicts:
#	CHANGELOG.md
@clawsweeper

clawsweeper Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(exec): keep pending approval warnings truthful This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof on exact head 36e90a99e114a480c3d1d7094a7f986f98c917f2:

  • Blacksmith Testbox tbx_01kwy0fhy32t821vwnbe3exev3: pnpm test src/agents/bash-tools.exec.approval-id.test.ts src/agents/bash-tools.exec-foreground-failures.test.ts src/agents/bash-tools.exec-host-node.test.ts — 3 files / 95 tests passed.
  • Same Testbox: pnpm check:changed — core/coreTests/docs lanes passed, including production and test type checks, lint, docs/policy guards, and cycle checks.
  • Scoped formatter check passed for all eight changed files.
  • Fresh autoreview reported no accepted or actionable findings.
  • Exact-head hosted CI run 28858894348: 72 passing checks, 29 intentional skips, no failures or pending checks.
  • Repository guard OPENCLAW_TESTBOX=1 scripts/pr prepare-run 101561 completed with hosted exact-head gates and matching prep/PR SHA.

Behavior proof covers all four relevant states: pending gateway and node approvals omit the foreground-only warning; actual gateway and node inline execution retain it. Documentation now distinguishes inline native-gateway approvals from asynchronous node/non-native approval delivery.

@steipete
steipete merged commit 942b449 into main Jul 7, 2026
101 checks passed
@steipete
steipete deleted the codex/replay-78184-exec-approval-warning branch July 7, 2026 10:30
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant