Skip to content

fix(condense): summarize effective history, excluding truncated messages - #1841

Open
PierrunoYT wants to merge 1 commit into
Zoo-Code-Org:mainfrom
PierrunoYT:fix/1823-condense-effective-history
Open

PierrunoYT wants to merge 1 commit into
Zoo-Code-Org:mainfrom
PierrunoYT:fix/1823-condense-effective-history

Conversation

@PierrunoYT

Copy link
Copy Markdown
Contributor

Summary

  • Context condensation selected messages with getMessagesSinceLastSummary, which ignores truncationParent, so messages already hidden by sliding-window truncation were sent to the condensing request and could exceed the context window.
  • Now uses getEffectiveApiHistory, the same history normal requests send. Stored history is preserved (all messages are still tagged with condenseParent).

Fixes #1823

Test plan

  • New regression test in condense.spec.ts (fails without the fix, passes with it)
  • core/condense, core/context-management, core/task suites pass
  • pnpm check-types and lint pass

🤖 Generated with Claude Code

summarizeConversation selected its input with getMessagesSinceLastSummary,
which ignores truncationParent. Messages already hidden by sliding-window
truncation were sent to the condensing request, which could exceed the
model context window even though normal requests still fit.

Use getEffectiveApiHistory, the same selection normal requests use. The
stored history is unchanged; all messages are still tagged with
condenseParent.

Fixes Zoo-Code-Org#1823

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: Zoo-Code-Org/Zoo-Code/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: cd6c1215-bc41-4eaa-8e69-02d6ea88f698

📥 Commits

Reviewing files that changed from the base of the PR and between 8bec7c1 and 115f79a.

📒 Files selected for processing (2)
  • src/core/condense/__tests__/condense.spec.ts
  • src/core/condense/index.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Review status

Thanks for contributing. This comment tracks the review sequence and the next action.

Current step: Required CI passed. Waiting for automated review of the latest commit.

If automated review does not start, a maintainer must restart it.

Review-state labels are managed by this workflow; do not edit them manually. community-approved is managed the same way — do not add or remove it manually. It signals a fresh community code approval for the current head as an advisory priority only; maintainer review is still required.

@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot added coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit labels Sep 28, 2026

This branch has not been deployed

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

Labels

awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit coderabbit-review-active Required CI passed; CodeRabbit review is active

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Context condensation includes truncated messages and exceeds the context window

1 participant