Skip to content

fix(agents): report failed secret input prompt delivery - #177688

Merged
steipete merged 1 commit into
mainfrom
deslop/z20-136-error-owners-20261015
Oct 19, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/z20-136-error-owners-20261015

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A rejected secret-input prompt delivery silently appeared as a cancelled question. Unlike ordinary question delivery failure, this path recorded no diagnostic explaining why no input was obtained.

Change

Record one static warning through the existing agent logger when delivery failure cancels a still-pending secret-input request. Keep the cancelled public result, timer/listener cleanup, current request ownership, answer authority, and secret nondurability unchanged. Neither the prompt nor the delivery exception enters the warning. A late rejection after another terminal outcome remains quiet.

Best-effort tradeoffs accepted

  • Preserve the existing cancellation result rather than adding a protocol outcome. The warning records unexpected delivery failure without retaining possibly sensitive exception details; no credential, permission, durability, or schema contract changes.

Production: +7/-1, net +6 lines. Tests: +40. This is a silent-failure fix, not cleanup deletion credit.

Evidence

  • Original exported question entry: pending-failure warning regression fails as intended; already-aborted control passes. 225.41 seconds Vitest / 246.86 seconds wrapper, including 98.483 seconds cached-worker preparation. Nineteen unrelated cases command-filtered; no source skips.
  • Targeted two-root native types, focused syntax lint, formatting and whitespace pass.
  • Fresh isolated P0-P2 review: scoped-clean, 0.98 confidence; exact authored blobs verified.
  • Complete question owner and structured-input consumer: 28 passed, 199.11 seconds Vitest / 229.15 seconds wrapper, including 105.663 seconds cached-worker preparation. The two new cases took 18ms and 3ms; retained real persistence cases explain most test time. Suppression guard: 14 passed, 21.03 seconds Vitest / 27.04 seconds wrapper. Exact-head hosted CI remains pending. No live provider/channel claim, broad local build, retry, timeout, skip or suppression change.
  • Targeted import inspection: the existing question-owner path already reaches the canonical logging subsystem; the new three-line logger leaf has that same sole runtime dependency. Broad architecture and SDK gates remain hosted-CI proof, not a claimed local whole-graph scan.

The swallowed rejection originated in #126387; the full introducing secret-path diff and PR body were inspected. No human production incident is claimed.

@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Oct 19, 2026
@steipete
steipete marked this pull request as ready for review October 19, 2026 20:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T20:04:44.350743Z 2efd499 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR logs a static warning when failed delivery cancels a pending secret-input prompt.

Example: Secret-prompt delivery rejects for session agent:main:secret-delivery-failure.

  • Before: The question returns cancelled without recording why delivery failed.
  • After: The question still returns cancelled and records one warning without prompt content or exception details.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported fix with useful failure and abort controls; confidence in runtime evidence remains limited to the reported in-process tests.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored diagnostic change is outside the ordinary contributor-proof gate; the body reports baseline and fixed exported-owner regressions, explicitly makes no live-channel claim, and supplies no shipped-entry-point capture.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Operators cannot distinguish secret-prompt delivery failure from ordinary cancellation using the existing diagnostics.
Reason: The maintainer-authored direction explicitly accepts the unchanged cancellation result, and the small warning closes the stated observability gap without retaining sensitive content.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR fixes a concrete diagnostic omission still present on main, with no introduced correctness or security findings.

Priority: P3
Reviewed head: 2efd499ffd5d1e6b30629bcbc3dfde03533163dc

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence exercises the exported question owner with an injected delivery callback, without a shipped Gateway or channel trace of the new warning.
Agent review details

How this fits together

The shared agent harness presents structured-input questions through reply callbacks, owns pending request settlement, and returns answers or cancellation to runtime adapters.

flowchart TD
  A[Structured input caller] --> B[Gateway question owner]
  B --> C[Secret prompt delivery]
  C --> D[Reply callback]
  D --> E[Delivery rejection]
  E --> F[Pending request settlement]
  F --> G[Static agent warning]
  F --> H[Cancelled result]
Loading

Technical review

Best possible solution:

Keep the warning at the existing secret-request settlement owner while preserving cancellation, cleanup, and secret nondurability.

Do we have a high-confidence way to reproduce the issue?

Source inspection establishes that a rejected secret-prompt delivery callback cancels the request without a diagnostic on main; the PR reports a failing baseline regression, but no target code was executed during this review.

Is this the best way to solve the issue?

The patch is the smallest complete diagnostic fix: it reuses the existing logger and settlement result, adds no state or parallel owner, and suppresses warnings after another terminal outcome.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c91613518f80.

Provenance checked

  • Secret-prompt rejection and cancellation keeps the original intent (7e0b599: Shared structured-input handling deliberately kept explicit secrets out of durable question records and fenced terminal outcomes.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Focused introduced change: The pinned introduction diff adds the existing agent logger and warns only when finish successfully settles the pending request; no authority, persistence, or protocol behavior changes. (src/agents/harness/gateway-question.ts:523, 2efd499ffd5d)
  • Current-main omission: Current main still handles secret-prompt delivery rejection with catch(() => finish()), preserving cancellation without recording the delivery failure. (src/agents/harness/gateway-question.ts:522, c91613518f80)
  • Distinct regression controls: The added exported-owner tests inject a rejected delivery callback and distinguish pending failure from rejection after abort, checking cancellation and the complete warning arguments. (src/agents/harness/gateway-question.test.ts:140, 2efd499ffd5d)
  • Original design and accepted tradeoff: fix: surface Codex input prompts across runtimes #126387 introduced transient secret-input handling and cancellation fencing; this PR explicitly retains cancellation and omits potentially sensitive exception details. (src/agents/harness/gateway-question.ts:479, 7e0b599ca484)
  • CI context check needs reconciliation: The failed PR context and evidence check requests authored problem and evidence sections, while the current body contains both; its annotations establish a context-gate failure rather than a production-code failure. (2efd499ffd5d)
  • Repository policy and clean checkout: Read the complete root and agent-area instructions and applied the simplification and test-value guidance; no maintainer-notes directory exists, and the checkout remained clean. (src/agents/AGENTS.md:1, 2efd499ffd5d)

Likely related people:

  • Peter Steinberger: Raw commit 7e0b599 adds src/agents/harness/gateway-question.ts:314 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7e0b599ca484; files: src/agents/harness/gateway-question.ts)

PR surface

Source +6, Tests +40. Total +46 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 7 1 +6
Tests 1 40 0 +40
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 47 1 +46

Labels

Label changes:

  • add P3: This improves diagnostics for failed secret-prompt delivery without changing the existing cancellation outcome.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This improves diagnostics for failed secret-prompt delivery without changing the existing cancellation outcome.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 4:22 PM ET / 20:22 UTC.

@steipete
steipete merged commit 3e15158 into main Oct 19, 2026
217 of 220 checks passed
@steipete
steipete deleted the deslop/z20-136-error-owners-20261015 branch October 19, 2026 20:25
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Oct 19, 2026
* commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (#177614)
  fix(release): tag restart plugin cohorts consistently (#177725)
  refactor(ui): inline single-caller detail requests (#177705)
  chore(i18n): refresh native locales (#177721)
  refactor(codex): drop unread private runtime reports (#177689)
  refactor(ui): consolidate static artwork registries (#177692)
  refactor(ui): derive settings schema analysis in the view (#177624)
  refactor(media): consolidate capability defaults and compression grids (#177665)
  refactor(auth): bind OAuth managers to native provider operations (#177676)
  refactor(ui): remove redundant component rendering layers (#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082)
  fix(agents): report failed secret input prompt delivery (#177688)
  refactor(ui): share chat message render contracts (#177668)
  fix(ui): settle model status after overlapping publication (#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (#177670)
  refactor(runtime): rely on canonical async lifecycle owners (#177635)
  refactor: fold private operation helpers into their callers (#177655)
  refactor(ui): remove unused chat leaf element adapters (#177582)
  perf(talk): use published authority for foreign voice writes (#177533)
  ...
vincentkoc added a commit that referenced this pull request Oct 19, 2026
#167350)

* fix(pr): retain the admitted workflow across maintainer commands

* fix: refresh the reviewed correction baseline

Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163

* fix(pr): preserve cold workflow admission and repository identity

* chore(pr): integrate canonical main CI repair

* commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (#177614)
  fix(release): tag restart plugin cohorts consistently (#177725)
  refactor(ui): inline single-caller detail requests (#177705)
  chore(i18n): refresh native locales (#177721)
  refactor(codex): drop unread private runtime reports (#177689)
  refactor(ui): consolidate static artwork registries (#177692)
  refactor(ui): derive settings schema analysis in the view (#177624)
  refactor(media): consolidate capability defaults and compression grids (#177665)
  refactor(auth): bind OAuth managers to native provider operations (#177676)
  refactor(ui): remove redundant component rendering layers (#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082)
  fix(agents): report failed secret input prompt delivery (#177688)
  refactor(ui): share chat message render contracts (#177668)
  fix(ui): settle model status after overlapping publication (#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (#177670)
  refactor(runtime): rely on canonical async lifecycle owners (#177635)
  refactor: fold private operation helpers into their callers (#177655)
  refactor(ui): remove unused chat leaf element adapters (#177582)
  perf(talk): use published authority for foreign voice writes (#177533)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
openclaw#167350)

* fix(pr): retain the admitted workflow across maintainer commands

* fix: refresh the reviewed correction baseline

Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163

* fix(pr): preserve cold workflow admission and repository identity

* chore(pr): integrate canonical main CI repair

* commit '4f8617589b6c71d754171052b603fe534901bfa1': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (openclaw#177614)
  fix(release): tag restart plugin cohorts consistently (openclaw#177725)
  refactor(ui): inline single-caller detail requests (openclaw#177705)
  chore(i18n): refresh native locales (openclaw#177721)
  refactor(codex): drop unread private runtime reports (openclaw#177689)
  refactor(ui): consolidate static artwork registries (openclaw#177692)
  refactor(ui): derive settings schema analysis in the view (openclaw#177624)
  refactor(media): consolidate capability defaults and compression grids (openclaw#177665)
  refactor(auth): bind OAuth managers to native provider operations (openclaw#177676)
  refactor(ui): remove redundant component rendering layers (openclaw#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (openclaw#166082)
  fix(agents): report failed secret input prompt delivery (openclaw#177688)
  refactor(ui): share chat message render contracts (openclaw#177668)
  fix(ui): settle model status after overlapping publication (openclaw#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (openclaw#177670)
  refactor(runtime): rely on canonical async lifecycle owners (openclaw#177635)
  refactor: fold private operation helpers into their callers (openclaw#177655)
  refactor(ui): remove unused chat leaf element adapters (openclaw#177582)
  perf(talk): use published authority for foreign voice writes (openclaw#177533)
  ...

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant