Skip to content

fix: hide raw background command notices from chat - #168236

Merged
RomneyDa merged 1 commit into
mainfrom
openclaw/opaque-message-visibility-issue
Oct 10, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
openclaw/opaque-message-visibility-issue

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

What Problem This Solves

Background exec completion inputs were displayed as opaque SYSTEM chat rows, including internal run identifiers and truncated command output.

User Impact

Raw exec notices no longer appear in Control UI history or live message updates. Background commands still wake the agent, and its user-facing results remain visible. Genuine user messages, restart notices, and assistant replies are preserved. No configuration or migration changes.

Why This Change Was Made

Filter user-role internal_system / exec inputs at the existing shared Gateway chat-display projection. This keeps history and live delivery under one visibility owner, without text matching, a separate UI filter, or changes to the raw model transcript.

Evidence

  • Boundary regression covers successful and failed exec notices, normalized provenance, identical genuine user text, restart notices, assistant replies, and nonmutation of the original input. Both new cases failed before the fix.
  • pnpm test src/gateway/chat-display-projection.visibility.test.ts --maxWorkers=1: 15 passed, 183.43 s wall time, approximately 0.44 s assertions (30 ms combined for the two new cases). Compiler/admission work dominated this run. CI seconds not yet measured.
  • Visibility plus transcript-message suites: 22 passed, 33.98 s wall time, on the same unchanged patch.
  • Native check-changed gate passed for all three changed files: core and 27 core-test typecheck graphs, formatting, lint, ratchets, export scans, and runtime/storage/import guards. git diff --check passed.
  • Fresh independent P0/P1 review: no findings.
  • Source Control UI with the isolated mock Gateway reproduced the original rendered state and exercised the fixed projection: five chat rows become three, with both exec notices removed and the user/progress/follow-up rows retained. Both replay cases passed. Screenshots below use synthetic content; no private conversation or live Gateway data.

Before

Before: raw background exec notices appear as SYSTEM rows

After

After: user messages and agent progress remain without raw exec notices

@clawsweeper

clawsweeper Bot commented Oct 10, 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 docs Improvements or additions to documentation gateway Gateway runtime size: XS labels Oct 10, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Hide raw background-command completion notices from Gateway chat displays while preserving transcripts and assistant replies.

Example: A background command finishes with code 0 and captured output.

  • Before: Control UI displays an opaque SYSTEM row such as “Exec completed (background-one, code 0)”.
  • After: The completion row is hidden while user messages and assistant progress remain visible.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct repair with inspected browser proof and meaningful boundary regressions; the demonstrated runtime uses a synthetic Gateway replay.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots exercise the source Control UI with an isolated mock Gateway and the changed projection, removing both exec notices while preserving conversation rows; this demonstrates display behavior rather than live command execution.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Background command completions appear as opaque SYSTEM rows containing internal identifiers and truncated output.
Reason: This maintainer-authored repair follows the established internal-input visibility boundary without adding configuration or changing command execution.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs a concrete display defect still present on current main, with sufficient visual proof and no actionable findings; the earlier draft blocker is resolved.

Priority: P2
Reviewed head: 0dd22422bc1472d4620ccc70a6eb4cc3a5b6d15b

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway transforms transcript messages into history pages and live session.message payloads consumed by chat clients.

flowchart TD
  A[Background command completion] --> B[Agent transcript]
  B --> C[Agent continuation]
  B --> D[Shared display projection]
  C --> E[Assistant reply]
  E --> D
  D --> F[History and live chat]
Loading

Technical review

Best possible solution:

Keep the narrow provenance filter in the shared Gateway display owner so history and live chat agree without changing model context.

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

Current main permits provenance-tagged exec inputs through its display predicate, and the supplied Control UI replay demonstrates the visible symptom without requiring a new run.

Is this the best way to solve the issue?

The existing shared projection is the appropriate owner, and structured provenance avoids suppressing genuine user messages containing the same text.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Gateway internal-input visibility keeps the original intent (16c35b2: Keep internal completion wakes available to the model while hiding them from user-facing history and preserving assistant responses.)
  • Shared display projection keeps the original intent (e144bc1: Split the projection into focused modules while preserving its public facade, pipeline order, and existing behavior.)
  • Background command continuation keeps the original intent (753a7a5: Run immediate notifications through ordinary conversation execution while retaining session history, routing, permissions, and settlement.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Focused visibility repair: The introduced hunk hides only user-role messages with normalized internal_system provenance and sourceTool exec; execution and transcript persistence are untouched. (src/gateway/chat-display-projection.history.ts:355, 0dd22422bc14)
  • Current main still needs the repair: The fetched main visibility predicate hides completion-report and subagent inputs but lacks the internal_system exec case. (src/gateway/chat-display-projection.history.ts:355, 96c8ba5fe649)
  • Shared live and history owner: History-page preparation and live message payloads consume the shared display projection; live payload creation returns no message when projection hides the input. (src/gateway/session-transcript-message.ts:113, 0dd22422bc14)
  • Production provenance matches the filter: Ordinary session-event handoff records internal_system provenance with the event source as sourceTool; legacy exec completion dispatch also records sourceTool exec. (src/auto-reply/reply/session-event-handoff.ts:428, 0dd22422bc14)
  • Inspected before and after screenshots: Both prepared images show the source Control UI replay changing five rows to three: both SYSTEM exec notices disappear while the user, assistant progress, and follow-up rows remain; the body identifies synthetic content and an isolated mock Gateway. (0dd22422bc14)
  • Meaningful boundary regressions: Added cases cover successful and failed notices, whitespace normalization, identical genuine user text, restart notices, assistant replies, and original-input nonmutation; the body reports both cases failed before the fix. (src/gateway/chat-display-projection.visibility.test.ts:62, 0dd22422bc14)

Likely related people:

  • Peter Steinberger: Raw commit e144bc1 adds src/gateway/chat-display-projection.history.ts:241 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e144bc16d874; files: src/gateway/chat-display-projection.history.ts)
  • Dallin Romney: Raw commit cd9913f adds src/gateway/chat-display-projection.history.ts:333 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cd9913f1b110; files: src/gateway/chat-display-projection.history.ts)
  • Michael Appel: Raw commit 16c35b2 adds src/gateway/chat-display-projection.history.ts:249 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 16c35b2df832; files: src/gateway/chat-display-projection.history.ts)

PR surface

Source +8, Tests +24, Docs +1. Total +33 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 8 0 +8
Tests 1 24 0 +24
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 33 0 +33

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Opaque completion rows confuse chat users without blocking command execution or assistant replies.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-10T05:41:03.016Z sha 0dd2242 :: needs changes before merge. :: none

Reviewed October 10, 2026, 2:00 AM ET / 06:00 UTC (Revision 2).

@RomneyDa
RomneyDa marked this pull request as ready for review October 10, 2026 05:57
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 10, 2026
@RomneyDa
RomneyDa merged commit 8c84abb into main Oct 10, 2026
197 checks passed
@RomneyDa
RomneyDa deleted the openclaw/opaque-message-visibility-issue branch October 10, 2026 06:12
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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