Skip to content

fix(agents): preserve image attachment ownership in queued follow-ups - #128272

Merged
steipete merged 1 commit into
mainfrom
codex/agent-followup-image-provenance-20260823
Aug 23, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/agent-followup-image-provenance-20260823

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • preserve the structured image-fact ownership of queued agent follow-up messages
  • route initial prompts, steering, and follow-ups through the existing canonical user-message constructor
  • remove the duplicate follow-up message builder (production delta: +1/-5, net -4 lines)

Root cause

Queued follow-ups independently built user messages from image content and never attached the existing mediaImageBlockFactIndexes metadata. Initial prompts and steering already use the canonical constructor, so their image ownership survived replay while queued follow-up attachments lost their provenance.

Verification

  • Confirmed the queued-follow-up regression fails on untouched main because the emitted message lacks __openclaw.mediaImageBlockFactIndexes.
  • Extended the existing steering regression to prove both steering and queued follow-ups preserve the same structured image ownership without duplicating fixtures.
  • node scripts/run-vitest.mjs src/agents/sessions/sdk.test.ts — 31 tests passed.
  • Targeted formatting, lint, and git diff --check passed.
  • Independent structured Codex review: no actionable findings.

Risk

Low: reuses the existing private user-message constructor, changes no storage schema, public API, configuration, provider behavior, or Gateway protocol, and removes the divergent production path.

@clawsweeper

clawsweeper Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Aug 23, 2026
@steipete
steipete marked this pull request as ready for review August 23, 2026 16:21
@steipete
steipete merged commit 17ecb9d into main Aug 23, 2026
294 checks passed
@steipete
steipete deleted the codex/agent-followup-image-provenance-20260823 branch August 23, 2026 16:37
@steipete

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 maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant