Skip to content

fix(history): restore attachments during session replay#297

Open
Orcaryn wants to merge 1 commit into
agentclientprotocol:mainfrom
Orcaryn:chapeta/history-attachments
Open

fix(history): restore attachments during session replay#297
Orcaryn wants to merge 1 commit into
agentclientprotocol:mainfrom
Orcaryn:chapeta/history-attachments

Conversation

@Orcaryn

@Orcaryn Orcaryn commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • replay embedded and local history images as ACP image blocks
  • remove Codex's synthetic file wrapper from replayed user text
  • preserve file mentions as ACP resource links

Root cause

Codex stores attachment context as synthetic prompt text plus structured UserInput entries. During session/load, embedded images and available local images were replayed as text links, file mentions were dropped, and the synthetic wrapper was exposed verbatim. ACP clients therefore received transport text instead of structured attachments.

Validation

  • npm run typecheck
  • npm test — 303 passed, 28 skipped
  • npm run bundle:all with Bun 1.3.11 — all six targets passed
  • real Codex smoke test completed with end_turn
  • direct live session/load of the original failing thread emitted an ACP image content block and completed successfully

@Orcaryn
Orcaryn marked this pull request as ready for review July 14, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants