Repository navigation
fix(webchat): expose inline uploads to file tools - #143753
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 12:18 PM ET / 16:18 UTC (Revision 3). ClawSweeper reviewWhat this changesMakes inline WebChat image uploads readable by file tools in the session’s execution workspace while preserving one vision input. Merge readiness✅ Ready for maintainer review This remains a useful, bounded repair: current main and the latest release still omit ordinary inline uploads from staging. No introduced correctness defect was found, and the recorded browser results support the repaired path. Priority: P2 Review scores
Verification
How this fits togetherWebChat sends uploads through Gateway attachment preparation into the agent reply pipeline. That pipeline stages managed files into the execution workspace and supplies attachment references and images to the agent. flowchart TD
A[WebChat upload] --> B[Gateway attachment preparation]
B --> C[Managed media store]
C --> D[Active attachment facts]
D --> E[Session workspace staging]
E --> F[File tools]
B --> G[Single vision input]
D --> H[Suppress duplicate hydration]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +47, Tests +291. Total +338 across 10 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep attachment staging and workspace selection with their existing owners, while retaining the broader offloaded-image work in the linked issue. Do we have a high-confidence way to reproduce the issue? Yes: current main’s ordinary inline-image route omits active media facts and therefore misses staging; the PR also records a failing baseline browser run. This review did not execute the application. Is this the best way to solve the issue? Yes: the repair supplies missing facts to existing staging and workspace-selection owners, preserves durable claims, and suppresses duplicate image hydration without adding configuration or a parallel file-access mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0f68d696c3cc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Thanks @harjothkhara! Proof: real bundled WebChat uploads reached file tools in the selected workspace. Actual image reads and SHA-256 output matched the uploaded bytes, with one current user-image input and correct outside-workspace rejection.
The broader issue remains open for the existing all-offloaded image path; this landing covers ordinary inline uploads. Exact-head CI passed after one diagnostic rerun. The first attempt's deadline assertion failure remains recorded; its exact cause was not captured. No red-check exception was used. |
Refs #103198
What Problem This Solves
Small images uploaded through WebChat reach vision, but the agent cannot use the same upload with file tools because the active turn omits its persisted media entry.
This change passes that entry to the existing validated staging owner and selects the session's execution workspace. It suppresses image hydration from the managed copy, so the model keeps one original user-image input. Configured workspaces for skills and model preparation remain separate from session and subagent execution workspaces.
Evidence
The built Gateway and bundled Control UI reproduced the missing-path failure on pinned main
94a2d79bf934. Real browser validation also found that the initial fix staged a selected-workspace upload in the default workspace, where the file guard correctly rejected it. The completed repair stages the upload in its selected workspace before the actual file read and digest command.Verified runtime outcomes:
The small-image digest was
860f57b09f6d8d3e4264ec14ea3ca2157878804e0cd7ae0cd375ea3da62c502e. The distinct mixed/selected-workspace image digest was86c4823ac6fb1fc20bb1e0cad44a384c1bbbf60e580761caf82baa8c40abd296.Validation: 125 distinct focused attachment, Gateway, staging, lifecycle, and workspace cases passed across the retained proof; affected staging and skills/cwd cases were rerun after the workspace correction. Durable image claims remain path-free while active media provides the files for staging. New regressions fail on baseline production for the intended reasons. Runtime builds, changed-file formatting, syntax lint, and line/assertion checks pass. Independent runtime validation uses synthetic uploads and fresh judgments for each local provider request.
Scope: this fixes ordinary inline upload access. The existing vision-capable all-offloaded route still supplies no file-tool path, so the broader issue remains linked. File-policy proof is not an OS-container test. AI-assisted.