Skip to content

Live compaction synthesis can leak raw analysis and summary XML into the feed #345

Closed

Description

@Juliusolsson05

Problem

During /compact, the feed can render the raw synthesis response as ordinary assistant markdown, including <analysis> / <summary> style content, instead of showing the live compaction placeholder.

Evidence

Bundle 2026-06-22T12-42-54-045-c973322e:

  • feed-debug.jsonl: claude.compaction condition is visible/running.
  • proxy-semantic.json.currentTurn.text starts with <analysis>.
  • Semantic turn_started event has no isCompactionSynthesis.
  • proxy-events.jsonl: request flow reports request_shape.compaction_synthesis:false.

Bundle 2026-06-14T14-02-05-796-a8ad1ebb:

  • Same shape: semantic current turn text starts with <analysis>, text length around 15k, rendered as a normal semantic block.

Suspected Cause

The proxy compaction detector likely depends on a request signature that drifted. Because request shape explicitly reports compaction_synthesis:false, the adapter does not attach isCompactionSynthesis, and StreamingTurn renders the raw semantic text.

Related paths:

  • packages/claude-code-headless/src/proxy/mitmAddon.py
  • packages/claude-code-headless/src/proxy/ClaudeProxyAdapter.ts
  • src/renderer/src/features/feed/ui/semantic/StreamingTurn.tsx

Expected

When any reliable signal says compaction is running, the feed should never paint raw synthesis XML. It should show the compaction placeholder until compact boundary/summary entries land.

Activity

  1. Juliusolsson05 commented on Jun 22, 2026

    @Juliusolsson05
    OwnerAuthor

    Linking this back to #172. This issue has a provider-detection side, but it is also an ownership failure: raw compaction synthesis text is allowed to render even while another signal says compaction is active.

    The detector may still need a targeted fix, but the #172 single-owner feed model should prevent raw synthesis content from painting whenever a compaction owner is active. Re-test after #172 to separate renderer ownership leftovers from proxy/request-shape detection leftovers.

  2. Juliusolsson05 commented on Aug 30, 2026

    @Juliusolsson05
    OwnerAuthor

    Closing as fixed and covered. This one is stronger than a supersede — the fix cites this issue by number in the source.

    src/renderer/src/rendering/observations/semantic.ts:19-20:

    //   - compaction synthesis never yields candidates (#345: raw <analysis>/
    //     <summary> XML rendered as assistant prose when the proxy detector's ...
    

    The guard is a first-class suppression in the ledger, not an ad-hoc filter:

    • compaction-synthesis is a member of the closed RenderReason enum (rendering/model/types.ts:173), emitted at observations/semantic.ts:189.
    • Per the rendering design principles (P2), every RenderReason must have at least one fixture proving when it fires — so this suppression carries recorded evidence rather than resting on review judgement. Coverage lives in rendering/observations/semantic.test.ts and committed.test.ts.

    Raw <analysis>/<summary> XML can therefore no longer reach the feed as assistant prose: the collector declines to emit a candidate at all, and the decision is recorded with its reason.

    Landed via PR #427 (semantic collector with model-level guards).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingprovider:claudeAffects Claude Code integration

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions