feat: compact tool-call write-back for retain noise - #567
Open
luxus wants to merge 1 commit into
Open
Conversation
Default retain.compactToolCalls=true so assistant tool calls keep only name + primary target (path/command/query), cutting mechanical noise while preserving what was touched. Set false for full args (forensic). Closes #561
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a default “compact tool-call” projection to reduce retain noise by storing tool calls as name + primary target instead of full argument payloads, and updates recall formatting to match the compact representation.
Changes:
- Add
retain.compactToolCalls(defaulttrue) and normalize it into the resolved config. - Compact assistant tool-call content in both retain projection and recall-query formatting (e.g.,
[action bash echo hi]and retained{ arguments: { target } }). - Update tests and documentation to reflect the new compact tool-call behavior and the opt-out mode.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/retain.test.ts | Updates expectations for compacted retained tool-call arguments and adds opt-out test coverage. |
| tests/recall-format.test.ts | Updates recall query formatting expectation from [toolCall …] to [action … target]. |
| extensions/utils/messages.ts | Implements target extraction and compact tool-call formatting/projection. |
| extensions/types.ts | Adds retain.compactToolCalls to the resolved config type. |
| extensions/config/config-normalize.ts | Normalizes retain.compactToolCalls from user config with a default. |
| extensions/config/config-defaults.ts | Enables compact tool-call retention by default (compactToolCalls: true). |
| docs/memory-behavior.md | Documents the new default compact tool-call behavior and the opt-out setting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ], | ||
| }, | ||
| }, | ||
| compactToolCalls: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Default
retain.compactToolCalls=trueso assistant tool calls retain name + primary target only (no full args), matching coding-agents write-back noise discipline.Linked issue
Scope
messages.tsretain.compactToolCalls(default true; false for full args)Verification
npm run checknpm run check:coverage(source, tests, critical paths, orci:coverage)npm run typecheck:tsc(source/critical paths or full CI)ci:full)ci:package)npm run pack:verify(release/package changes)npm run smoke:hindsightor configuredHindsight Integrationpass (memory-path behavior changes orci:live-smoke; document unavailable live proof)Unit tests cover compact default and full-args opt-out. Live smoke not required for pure projection change.
Release impact
Automatic retain payloads compact tool-call arguments by default.
Risk and rollback
Follow-ups
Memory invariants
Guidance sync
AGENTS.mdandCONTRIBUTING.mdwere updated together.Agent checklist
AGENTS.mdandCONTRIBUTING.md.Notes
User/assistant text is still retained raw; only tool-call argument objects are compacted.