Skip to content

Stop compaction spacer text from becoming a model echo loop - #851

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7539-stop-compaction-spacer-text-from-becoming-a-model-echo-loop
Sep 10, 2026
Merged

Stop compaction spacer text from becoming a model echo loop#851
TheGreatAxios merged 2 commits into
mainfrom
cl-7539-stop-compaction-spacer-text-from-becoming-a-model-echo-loop

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Compact spacers use a non-lexical harness sentinel instead of the echoable [compaction] token
  • A spacer-only model reply is incomplete and does not re-trigger compaction
  • Frozen-prefix matching does not absorb a model-emitted spacer; consecutive compact cycles are capped

Verification

  • bun run typecheck, bun run build, and bun run test pass

Fixes CL-7539

@linear-code

linear-code Bot commented Sep 9, 2026

Copy link
Copy Markdown

CL-7539

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: approve (cannot GitHub-approve own PR).

CL-7539 holds at 5cc6df72. Spacers stamp model: "harness"; frozen-prefix matching requires that producer id; a spacer-only model reply is incomplete; consecutive compact cycles cap at 2; exhausted echoes stay on workflow and open-task rails. Role-alternation for consecutive user summaries still inserts a harness spacer.

No blocking or should-fix findings. [compact] remains a visible lexical token by adapter necessity; the loop is stopped by producer identity + echo-incomplete, not invisibility.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: approve (GitHub cannot approve own PR).

CL-7539 holds at 5cc6df72. Spacers stamp model: "harness"; frozen-prefix matching requires that producer id; a spacer-only model reply is incomplete; consecutive compact cycles cap at 2; exhausted echoes stay on workflow and open-task rails. Role-alternation for consecutive user summaries still inserts a harness spacer.

No blocking or should-fix findings. [compact] remains a visible lexical token by adapter necessity; the loop is stopped by producer identity + echo-incomplete, not invisibility.

@TheGreatAxios
TheGreatAxios force-pushed the cl-7539-stop-compaction-spacer-text-from-becoming-a-model-echo-loop branch from 5cc6df7 to c8b3dad Compare September 9, 2026 22:22
@TheGreatAxios
TheGreatAxios changed the base branch from main to cl-7533-codex-path-context-compaction-regression-after-0318-adapter September 9, 2026 22:29
@TheGreatAxios
TheGreatAxios added this pull request to stack #856 September 9, 2026 22:29
@TheGreatAxios
TheGreatAxios force-pushed the cl-7539-stop-compaction-spacer-text-from-becoming-a-model-echo-loop branch from c8b3dad to 026a3f2 Compare September 10, 2026 00:46
@TheGreatAxios
TheGreatAxios force-pushed the cl-7539-stop-compaction-spacer-text-from-becoming-a-model-echo-loop branch from 026a3f2 to 07b32f2 Compare September 10, 2026 00:48
Base automatically changed from cl-7533-codex-path-context-compaction-regression-after-0318-adapter to main September 10, 2026 00:50
Harness spacers were a natural-language token the model could copy as a
finished turn. Frozen-prefix matching then treated the echo as
harness-inserted, so idle compact re-armed and the prefix grew.
Missing model is not a producer id (replay sanitizer fills it), and a format-category sentinel can be dropped by adapters. Stamp reserved model harness, keep a visible sentinel, and keep exhausted spacer echoes on workflow and open-task rails.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7539-stop-compaction-spacer-text-from-becoming-a-model-echo-loop branch from 07b32f2 to 396539c Compare September 10, 2026 00:50
@TheGreatAxios
TheGreatAxios merged commit f425e3f into main Sep 10, 2026
5 checks passed
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