Skip to content

fix: send reply attachments from remote workspaces - #152633

Merged
Kimiyu-186 merged 1 commit into
mainfrom
codex/storage-output-attachments
Sep 20, 2026
Merged

Kimiyu-186 merged 1 commit into
mainfrom
codex/storage-output-attachments

Conversation

@Kimiyu-186

@Kimiyu-186 Kimiyu-186 commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Files produced in a remote workspace cannot be read from the Gateway filesystem when sending a reply.

Route output reads through an explicitly registered workspace attachment reader. The Codex adapter uses its existing bounded reader; other adapters can provide the same capability. Document-only bindings keep existing behavior. An enabled remote reader never falls back to a stale Gateway copy.

Use the existing host read-authority scope for staging and cleanup, including cancellation after reading. Preserve local/sandbox readers, sender policy, byte limits, and transcript text.

Output attachments only; uploads, Memory, Skills, and node transport remain separate. Part of openclaw/openclaw-enterprise#76. One commit directly on main, 21 files. No persisted schema change or SDK export growth.

Validation

  • Current head f473d8295263c61f8abf45e70ccbf70774ec27e4, based on 8aec983be3bdb5ea888a2d0bc1e58d65b28dc9d3. Rebase preserves the topic patch unchanged (git range-diff reports equality).
  • 104 focused tests pass after rebase: host authority/staging, remote media reads, seven Codex final-reply cases, and the native test-shard inventory guard. Independent P0/P1 review found no actionable findings in this diff.
  • Previous core production types, focused lint, formatting, and regression proof cover the unchanged topic patch. Regression tests fail before the document-only compatibility and post-read cancellation fixes; afterward, rejected staging leaves no file and an active host publishes the expected bytes.
  • The former shared CI failure (gateway-other: 701 test roots against a 700 limit) is fixed upstream by 4396f9bb; this base includes that fix and the guard now passes locally. No test-limit changes are added by this PR.
  • Current head f473d829 completed GitHub CI with no failed or pending checks; GitHub reports no merge conflict (September 19, 23:44 UTC).

@clawsweeper

clawsweeper Bot commented Sep 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 docs Improvements or additions to documentation agents Agent runtime and tooling extensions: codex size: L maintainer Maintainer-authored PR labels Sep 19, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 19, 2026
@clawsweeper

clawsweeper Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 19, 2026, 7:53 PM ET / 23:53 UTC (Revision 9).

ClawSweeper review

What this changes

The PR retrieves reply attachments from remote workspaces before their connection closes, stages authorized bytes for delivery, and preserves transcript text.

Merge readiness

⛔ Blocked before merge - 2 items remain

This remains useful work absent from current main. The earlier compatibility and staging-authority findings are addressed, and this review found no remaining blocking patch defect.

Priority: P2
Reviewed head: f473d8295263c61f8abf45e70ccbf70774ec27e4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful compatibility and authority coverage and no remaining blocking finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state classifies this as a maintainer PR, exempt from ordinary contributor proof. Production-path tests exercise remote attachment selection, denial, cancellation, and staging cleanup, but are supplemental rather than a claimed live Codex run; no unresolved authority violation requires an exceptional proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state classifies this as a maintainer PR, exempt from ordinary contributor proof. Production-path tests exercise remote attachment selection, denial, cancellation, and staging cleanup, but are supplemental rather than a claimed live Codex run; no unresolved authority violation requires an exceptional proof gate.
Evidence reviewed 9 items Pinned introduction and review continuity: Reviewed the merge-base 8aec983 to pinned-head delta. The prior completed review used this same head and had no remaining findings; its compatibility description is historical context, not an additional instruction.
Current main still lacks the capability: Fetched main has document workspace bindings but no outboundMedia member; its harness capability contract also lacks prepareReplyMedia. The central requested path therefore remains necessary.
Latest release check: The v2026.9.5 harness contract lacks reply-media preparation. Its source was read through GitHub after the local release blob could not be retrieved.
Findings None None.
Security None None.

How this fits together

Agent replies identify attachments that OpenClaw must load before sending them to a conversation. The harness supplies remote file access while the host controls sender policy, byte limits, staging, and delivery metadata.

flowchart TD
  A[Agent reply with attachment] --> B[Host attachment preparation]
  B --> C{Sender policy and path allowed}
  C -->|Yes| D[Bounded remote workspace reader]
  D --> E[Authority checked media staging]
  E --> F[Conversation attachment delivery]
  C -->|No| G[Delivery failure notice]
Loading

Before merge

  • Resolve merge risk (P1) - The optional plugin contracts intentionally make registered remote attachment failures visible instead of sending a Gateway copy; separately installed harnesses need a supporting host to use preparation.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +447, Tests +719, Docs +35. Total +1201 across 21 files.

View PR surface stats
Area Files Added Removed Net
Source 13 537 90 +447
Tests 6 723 4 +719
Docs 2 35 0 +35
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 21 1295 94 +1201

Review metrics

Metric Value Why it matters
Optional plugin capabilities 2 optional additions; 0 new configuration knobs Harness preparation and workspace attachment access extend existing contracts without requiring existing adapters to implement them.
Production versus test growth Production net +447 lines; tests and test support net +718 lines Production growth supports shared remote preparation and routing, with substantial coverage for lifecycle and compatibility boundaries.

Stored data model

Persistent data-model change detected: serialized state: src/agents/workspace-access.ts, unknown-data-model-change: src/agents/workspace-access.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Accept the documented optional contract (recommended)
    Retain opt-in remote attachment ownership, document-only compatibility, and explicit failure when authoritative remote bytes are unavailable.

Technical review

Best possible solution:

Retain the documented optional contract and existing local/sandbox compatibility, with the host remaining the sole policy and staging owner.

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

Yes, from source: a remote-only reply attachment reaches Gateway-local loading without a reader on current main. No runtime reproduction or tests were executed during this read-only review.

Is this the best way to solve the issue?

Yes. The patch reuses the existing media policy, bounded reader, staging store, and terminal delivery owner instead of rewriting transcripts or introducing a second delivery system.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs attachment delivery for remote workspaces with a bounded affected workflow.
  • merge-risk: 🚨 compatibility: Optional plugin contracts add authoritative remote attachment routing and deliberately eliminate stale-local fallback when enabled.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state classifies this as a maintainer PR, exempt from ordinary contributor proof. Production-path tests exercise remote attachment selection, denial, cancellation, and staging cleanup, but are supplemental rather than a claimed live Codex run; no unresolved authority violation requires an exceptional proof gate.

Evidence

What I checked:

  • Pinned introduction and review continuity: Reviewed the merge-base 8aec983 to pinned-head delta. The prior completed review used this same head and had no remaining findings; its compatibility description is historical context, not an additional instruction. (f473d8295263)
  • Current main still lacks the capability: Fetched main has document workspace bindings but no outboundMedia member; its harness capability contract also lacks prepareReplyMedia. The central requested path therefore remains necessary. (src/agents/workspace-access.ts:9, 137f4ba73e7c)
  • Latest release check: The v2026.9.5 harness contract lacks reply-media preparation. Its source was read through GitHub after the local release blob could not be retrieved. (src/agents/harness/host-capability-types.ts, ec9c1a13db89)
  • Prior authority finding resolved: Preparation captures host policy, combines cancellation signals, and runs inside the existing channel-read authority scope. The media store checks that scope before publication and cleans rejected output. Added coverage checks host closure, authority release, replacement, and revocation after reading. (src/agents/harness/reply-media.ts:37, f473d8295263)
  • Compatibility and forbidden-path coverage: Document-only active and stopped bindings retain local delivery. Registered attachment readers reject stale bindings and local aliases; tests also cover denied senders, byte limits, unrelated managed media, and explicit sandbox readers. (src/media/read-capability.workspace-access.test.ts:139, f473d8295263)
  • Production integration and dependency signal: The Codex adapter invokes the existing bounded command/exec reader with the remote workspace boundary and prepares both asynchronous and terminal replies. This explicit protocol dependency makes direct Codex-source inspection applicable. Seven added integration scenarios cover relative, absolute, asynchronous, denied, missing, oversized, and canceled attachment reads; their transport is synthetic, so these are supplemental tests. (extensions/codex/src/app-server/run-attempt-active-turn.ts:104, f473d8295263)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (8 earlier review cycles)
  • reviewed 2026-09-19T06:51:00.297Z sha f1f0f003a1358704e88805fd932b6dd4c2ae2be0 :: needs real behavior proof before merge. :: [P2] Bind media staging to the capability’s live authority
  • reviewed 2026-09-19T07:23:03.430Z sha 7f35c99a24ed00e03eccc5c79d6b920764223a04 :: needs real behavior proof before merge. :: [P1] Preserve attachment access for document-only workspace bindings | [P2] Bind media staging to the capability’s live authority
  • reviewed 2026-09-19T07:36:56.066Z sha 7f35c99a24ed00e03eccc5c79d6b920764223a04 :: needs real behavior proof before merge. :: [P1] Preserve attachment access for document-only workspace bindings | [P2] Bind media staging to the capability’s live authority
  • reviewed 2026-09-19T07:50:09.157Z sha bd1551f8a872bdeea14ea0c53a6e3e9628784e54 :: needs real behavior proof before merge. :: [P1] Preserve attachment access for document-only workspace bindings | [P2] Bind media staging to the capability’s live authority
  • reviewed 2026-09-19T08:39:05.332Z sha 4b4572e :: blocked before merge. :: none
  • reviewed 2026-09-19T19:07:09.119Z sha 3545745 :: blocked before merge. :: none
  • reviewed 2026-09-19T19:36:43.630Z sha 3545745 :: blocked before merge. :: none
  • reviewed 2026-09-19T20:01:00.971Z sha f473d82 :: blocked before merge. :: none

@Kimiyu-186
Kimiyu-186 force-pushed the codex/storage-output-attachments branch from f1f0f00 to 7f35c99 Compare September 19, 2026 07:15
@Kimiyu-186 Kimiyu-186 changed the title fix(codex): send attachments from remote workspace replies fix: send reply attachments from remote workspaces Sep 19, 2026
@Kimiyu-186
Kimiyu-186 marked this pull request as ready for review September 19, 2026 07:15
@Kimiyu-186
Kimiyu-186 force-pushed the codex/storage-output-attachments branch 2 times, most recently from bd1551f to 4b4572e Compare September 19, 2026 08:30
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 19, 2026
@Kimiyu-186
Kimiyu-186 force-pushed the codex/storage-output-attachments branch from 4b4572e to 3545745 Compare September 19, 2026 18:57
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Sep 19, 2026
@Kimiyu-186
Kimiyu-186 force-pushed the codex/storage-output-attachments branch from 3545745 to f473d82 Compare September 19, 2026 19:52
@Kimiyu-186
Kimiyu-186 merged commit 7d7e26a into main Sep 20, 2026
223 checks passed
@Kimiyu-186
Kimiyu-186 deleted the codex/storage-output-attachments branch September 20, 2026 00:31
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 20, 2026
Kimiyu-186 added a commit that referenced this pull request Sep 23, 2026
* feat: backport split storage to the September 4 release

Carry the merged workspace attachment, file-transfer, Memory, Skills,
and paired-node contracts onto sjf_openclaw_2026-09-04. Preserve the
release registry lifecycle, Skills cache and Memory database owners.

Includes the approved fs-safe 0.17.0 upgrade and its consumer adaptations.

Backports:
#152633 7d7e26a
#152640 fd46f38
#153124 14cf168
#152652 59916ac
#153126 e1976b0
#153438 e63393b
#154087 20db76a

* fix(node): preserve resumable pairing in release backport

* fix: complete release split-storage runtime compatibility

* fix: complete split-storage release integration

* test: align release file-safety fixtures with native operations

* test: scope gateway lock fault injection to Node handles

* test: align release automation and diagnostic fixtures
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 extensions: codex maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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