Skip to content

fix: keep tool messages paired during trimming - #28

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
Rayan-and-beyond:fix/23-tool-pair-safety
Sep 16, 2026
Merged

royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
Rayan-and-beyond:fix/23-tool-pair-safety

Conversation

@Rayan-and-beyond

Copy link
Copy Markdown
Contributor

Fixes #23.\n\nAdds a regression test proving compaction never leaves a tool_result without its matching tool_use when trimming, then keeps linked tool messages together during budget trimming.\n\nValidation: npm test (25 passed).

@royalpinto007
royalpinto007 merged commit a3129d7 into AgentPostmortem:main Sep 16, 2026
1 check 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.

--max trimming orphans tool_result from its tool_use

2 participants