Skip to content

fix(compaction): retry image-rejected summaries without images - #1672

Open
trac3r00 wants to merge 1 commit into
code-yeongyu:mainfrom
trac3r00:fix/compaction-invalid-image-payload
Open

trac3r00 wants to merge 1 commit into
code-yeongyu:mainfrom
trac3r00:fix/compaction-invalid-image-payload

Conversation

@trac3r00

@trac3r00 trac3r00 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep the first local/speculative compaction request multimodal.
  • If the provider rejects image input, retry once with text placeholders in place of image blocks, after context hooks.
  • Preserve surrounding text, tool-call/result identities, source history, cancellation, and normal non-compaction image handling.

Why

A provider image-url validation rejection left compaction cancelled and the context above its threshold. The original stored images were valid PNG/base64, so validating base64 at ingress alone would not recover this failure. This adds a bounded recovery path without turning all summaries text-only.

This is a Senpi host change; OMO does not own this request path. It is related to #1260's error surface but does not claim to fix that issue's separate double-prefix ingress bug.

Verification

Evidence is from an isolated worktree and synthetic fixtures only; no user transcripts, credentials, or original images are included.

  • Failing-first focused regression: 2 failures before the production change; final focused suite: 9/9 passed.
  • bun run --cwd packages/coding-agent test test/compaction: 76 files, 568 tests passed.
  • bun run check and bun run build: passed. Changed TypeScript files have no LSP diagnostics; git diff --check is clean.
  • Real CLI RPC exercise against a local scripted Responses endpoint reproduced cancellation before recovery and now completes compaction: request image counts [1, 1, 1, 0], with exactly one text-only summary retry and the expected summary returned. The final synthetic PNG was also checked for valid base64 and PNG chunk CRCs.
  • Parent code review and final independent gate review: APPROVE.
  • CHANGELOG_GATE_BASE=92db3be5420df329443abdda02cd30227482d90b node scripts/check-pr-changelog.mjs: passed after fetching the pinned upstream object required by this shallow checkout.

Scope

No dependency changes, provider rewrites, OMO adapter changes, or releases. The hosted provider was not called during verification.


Summary by cubic

Retries compaction summaries once with image placeholders when a provider rejects image input, so a failed image-validation error no longer cancels compaction and leaves the context over its threshold.

Retry behavior

  • The first summary request keeps images; exactly one text-only retry happens after request hooks, with source history and persisted entries untouched.
  • Only the narrowly matched image-format rejection triggers the retry on an image-bearing request; other errors, aborts, and image-free requests behave as before.

Written for commit 4522b40. Summary will update on new commits.

Review in cubic

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.

1 participant