Repository navigation
feat(reply): annotate recent history images - #100866
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 3:27 AM ET / 07:27 UTC. ClawSweeper reviewWhat this changesThe branch preserves each recent inbound image’s timestamp and bounded position in available history, then includes those facts in the ACP prompt note while retaining the media attachment and omitting its local path. Merge readinessKeep this PR open for maintainer review. It is a focused implementation of the linked history-image context request, carries no new configuration surface, has failing-first and runtime-oriented proof in the discussion, and the latest review cycle found no actionable patch defect; required checks were still running at the supplied snapshot. Priority: P2 Review scores
Verification
How this fits togetherChannel history is converted into recent image attachments before an ACP agent turn. The history-media layer carries sender, timestamp, message identifier, and position into a model-visible note so the agent can weigh older screenshots against newer conversation state. flowchart LR
A[Channel history] --> B[Recent image resolver]
B --> C[Image metadata]
C --> D[ACP prompt note]
D --> E[Agent turn]
E --> F[Model response]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +12, Tests +71. Total +83 across 2 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: After the remaining required checks finish, maintainers should review the refreshed merge result and land this single shared history-media implementation if the exact head remains clean. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the linked scenario is exercised by the focused ACP dispatch test, and the PR discussion reports a failing-first base-versus-fix result. A live credentialed channel conversation was not supplied, so this is not an independently reproduced live-channel failure. Is this the best way to solve the issue? Yes. Carrying metadata through the existing shared history-media path is narrower and more maintainable than channel-specific prompt changes, and it preserves image attachments while making their bounded history position explicit. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against ad1dc602594b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
Added the missing redacted runtime proof to the PR Evidence section. Summary of the new proof:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
* origin/main: (24 commits) fix(e2e): apply default service identity per flow (openclaw#116265) chore(android): record 2026.7.4 Play metadata fix(ci): accept one verified Telegram SUT launch (openclaw#116267) chore(android): prepare 2026.7.4 Play release fix(e2e): align service account state (openclaw#116254) refactor(qa): remove live-channel scenario registries and wrappers (openclaw#115752) fix(ci): let trusted Telegram QA stage runtime (openclaw#116252) fix(plugins): plugin install survives pnpm-only overrides (openclaw#116245) test(qa): recognize internal image completions (openclaw#116234) fix(test): review Codex runtime scan chunks (openclaw#116212) fix(systemd): clear start-limit latch before gateway start (openclaw#116178) fix(security): expose every executable call in plugin scans (openclaw#116222) chore(sdk): repin the API baseline after the resolver signature change test(e2e): delay the draft-proof final answer past the start gate fix(channels): resolve tool progress against the caller's stream mode fix(ci): satisfy docs formatting, lint, and the SDK API baseline test(e2e): add a progress-draft scenario to the mock provider docs(telegram): call out the changed default preview on upgrade refactor(channels): render the progress label as a block, not a line fix(channels): show tool lines under the progress status headline ...
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
…n-dedupe * origin/main: (25 commits) fix(qqbot): use Gateway timezone for reminders (#116294) test(openai): cover out-of-order named mark acks docs(openai): clarify cumulative playback marks test(openai): cover sustained unnamed mark acknowledgements fix(openai): preserve playback acknowledgement order test(openai): verify bounded playback acknowledgements fix(openai): bound realtime playback marks test(agents): mock incremental registry persistence (#116307) fix(memory-core): MEMORY.md compaction deletes user notes written under a promotion-style heading (#116180) feat(reply): annotate recent history images (#100866) chore(ios): refresh native i18n inventory fix(ios): isolate capability router handlers docs(ios): cut 2026.7.22 release notes docs(hooks): document validation responses test(qa): assert hook account rejection reasons fix(gateway): validate hook delivery accounts perf(gateway): bound prepared runtime startup work (#116261) fix(agents): prevent registry stalls during large fan-outs (#116286) fix(sqlite): preserve replaced snapshot targets on Windows (#116284) fix(ci): load frozen shard runner without repository fetch (#116273) ...
* feat(reply): annotate recent history images * fix(reply): describe bounded history image positions --------- Co-authored-by: martin <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
…n-dedupe * origin/main: (25 commits) fix(qqbot): use Gateway timezone for reminders (openclaw#116294) test(openai): cover out-of-order named mark acks docs(openai): clarify cumulative playback marks test(openai): cover sustained unnamed mark acknowledgements fix(openai): preserve playback acknowledgement order test(openai): verify bounded playback acknowledgements fix(openai): bound realtime playback marks test(agents): mock incremental registry persistence (openclaw#116307) fix(memory-core): MEMORY.md compaction deletes user notes written under a promotion-style heading (openclaw#116180) feat(reply): annotate recent history images (openclaw#100866) chore(ios): refresh native i18n inventory fix(ios): isolate capability router handlers docs(ios): cut 2026.7.22 release notes docs(hooks): document validation responses test(qa): assert hook account rejection reasons fix(gateway): validate hook delivery accounts perf(gateway): bound prepared runtime startup work (openclaw#116261) fix(agents): prevent registry stalls during large fan-outs (openclaw#116286) fix(sqlite): preserve replaced snapshot targets on Windows (openclaw#116284) fix(ci): load frozen shard runner without repository fetch (openclaw#116273) ...
What Problem This Solves
Fixes #48321.
Recent inbound history images reached ACP turns with sender and optional message ID only. The model could see an older screenshot without knowing when it was sent or where it appeared in the available history, which made stale visual context harder to weigh against newer text.
Why This Change Was Made
resolveRecentInboundHistoryImagesalready walks structuredInboundHistoryentries with timestamps and stable order. This change preserves that metadata on each resolved image and includes it in the shared prompt note generated byappendRecentHistoryImageContext.The fix stays in the shared history-media path, so ACP-backed Slack, Discord, Telegram, and other channel turns use one implementation without a new config surface. The prompt deliberately says
message N of M in available history:InboundHistoryis a bounded window, not necessarily the full transport thread.Local media paths remain excluded from model-visible text.
User Impact
When a recent history image is attached to an ACP turn, the agent now receives metadata such as:
This gives the model an unambiguous timestamp and bounded ordering signal while retaining the image for compare/debug workflows.
Evidence
Current head:
8cb3cfc9b2fe12ce7847ca72340ba7841550b22e.tbx_01kyrmgz8wqq8kb7renr345875, run https://github.com/openclaw/openclaw/actions/runs/30513999022:src/auto-reply/reply/history.test.ts: 4 passed.src/auto-reply/reply/dispatch-acp.test.ts: 66 passed.oxfmt --checkpassed for both changed files.git diff --checkpassed.origin/main: clean, no accepted/actionable findings; patch-correct confidence 0.95.Not run: a live credentialed Slack, Discord, or Telegram model conversation. The shared ACP attachment and prompt path is covered directly by the focused runtime tests above.