Make compaction pay for images
Use when: Codex CLI or Desktop runs screenshot, browser, image-generation, or other multimodal tasks across repeated context compactions. Text-only retention accounting can preserve enough historical images to retrigger compaction, resend large payloads, and multiply append-only rollout size.
npm install -g @openai/[email protected]
or
pin
the
equivalent
signed
package
as
the
minimum
for
image-heavy
work.
Keep
source
images
as
external
artifacts;
pass
paths
or
stable
references
instead
of
repeated
inline
data
URLs.
Start
a
fresh
thread
after
the
first
unexplained
compaction
loop
rather
than
feeding
bloated
history
back
into
itself.
Acceptance
check:
in
a
disposable
image-capable
thread,
add
distinct,
numbered
screenshots
until
the
displayed
context
meter
crosses
the
compaction
threshold.
Run
/compact
twice,
then
inspect
the
latest
type:"compacted"
replacement
history.
Pass
only
if
newest
image
sentinels
remain,
older
ones
fall
outside
the
retention
budget,
a
short
follow-up
does
not
immediately
retrigger
compaction,
and
each
new
checkpoint
stays
bounded.
0.149.1
is
an
official
stable
release
dated
2026-08-24.
Its
five-commit
comparison
includes
“Budget
retained
images
during
remote
compaction”
plus
dedicated
image-budget
tests.
Independent
issue
reports
measured
image-bearing
replacement
histories
from
tens
of
megabytes
to
gigabytes
and
reproduced
repeated
compaction
on
Windows
and
macOS.
Caveat: the patch addresses retained-image budgeting in Responses compaction v2; it does not prove local or legacy compaction parity, remove old append-only checkpoints, externalize media, or guarantee that summary text and tool outputs converge below the next trigger.