You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that <read-files> and <modified-files> tags in compaction summaries can include files that no longer exist on disk. Here is the flow:
During a session, the agent reads or edits a file. The path is collected by extractFileOpsFromMessage in packages/coding-agent/src/core/compaction/utils.ts.
On compaction, computeFileLists and formatFileOperations turn these paths into XML tags.
On re-compaction, extractFileOperations in compaction.ts inherits all old paths from the previous CompactionDetails. New tool calls add more paths.
Paths are never removed — even if the file was deleted later.
Concrete effect:
A file deleted between two compactions still appears in <read-files> or <modified-files>.
The LLM receives the summary, sees the file listed, tries to read it — and gets "file not found".
My question: is this by-design?
The comment on CompactionDetails says "Files read in the compacted history," which suggests historical tracking. But the summary is used for continuation, so listing deleted files seems to hurt more than help.
Would a filesystem check (fs.existsSync in computeFileLists) be a reasonable approach? Or do you see a different direction for this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that
<read-files>and<modified-files>tags in compaction summaries can include files that no longer exist on disk. Here is the flow:Concrete effect:
<read-files>or<modified-files>.My question: is this by-design?
The comment on CompactionDetails says "Files read in the compacted history," which suggests historical tracking. But the summary is used for continuation, so listing deleted files seems to hurt more than help.
Would a filesystem check (fs.existsSync in computeFileLists) be a reasonable approach? Or do you see a different direction for this?
Beta Was this translation helpful? Give feedback.
All reactions