Repository navigation
Pass instructions to /compact so the summary can drop what the next task does not need
#19939
KelvinChung2000
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem or use case
When a thread moves on to a new task, the new task needs some of the existing context but not all of it. For example, the interface decisions from the finished task stay relevant, while its debug output and dead ends do not. A plain
/compactcannot be told which is which, so the summary keeps a generic mix of both.Claude Code's
/compacttakes optional instructions for the summary (/compact <optional custom summarization instructions>, the argument hint T3 already receives per #14789). T3 does not pass them on. On main (98bc998):apps/server/src/orchestration-v2/RunExecutionService.ts:1441routes a message tocompactThreadonly when its whole text is/compact.apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts:9326replaces the message text with"/compact"insidecompactThread.So
/compact drop the X debugging, keep the Y interface decisionsnever takes the compaction path and is sent as an ordinary turn. I have not checked what Claude Code then does with it, or how T3 renders the result.Proposed solution
/compact <text>tocompactThreadby matching the command rather than the whole message./compact <text>.Smallest useful scope
Claude only.
/compact <text>typed in the composer reaches Claude Code with its text and shows as a compaction in the timeline.Alternatives considered
/compact. The instructions become part of the history being summarised, and the summariser is not bound to follow them.Related
#14789 (argument hint for
/compact), #15106 (agent-initiated compaction; one comment asks to pin the task statement through compaction), #17170 (compact-before-send).All reactions