fix(memory): handle ENOENT gracefully in readFile#20680
Conversation
|
Hey @vignesh07 @gumadeiras — this fixes the ENOENT errors from #9307 by handling missing memory files gracefully in |
|
Taking a look. |
|
Closing this PR because it looks dirty (too many unrelated commits). Please recreate the PR from a clean branch. |
5 similar comments
|
Closing this PR because it looks dirty (too many unrelated commits). Please recreate the PR from a clean branch. |
|
Closing this PR because it looks dirty (too many unrelated commits). Please recreate the PR from a clean branch. |
|
Closing this PR because it looks dirty (too many unrelated commits). Please recreate the PR from a clean branch. |
|
Closing this PR because it looks dirty (too many unrelated commits). Please recreate the PR from a clean branch. |
|
Closing this PR because it looks dirty (too many unrelated commits). Please recreate the PR from a clean branch. |
When a memory file doesn't exist yet (e.g. daily log `2026-02-19.md`),
`readFile` now returns `{ text: "", path }` instead of propagating the
ENOENT error. This prevents noisy error responses from the memory read
tool and aligns with the "graceful degradation" recommendation in openclaw#9307.
Closes openclaw#9307
Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Too many files changed for review. ( |
7f75353 to
992d3d5
Compare
Summary
MemoryIndexManager.readFilenow catchesENOENTand returns{ text: "", path }instead of throwing, so the memory read tool degrades gracefully when a file doesn't exist yet (e.g. a daily log that hasn't been created).Closes #9307
Test plan
memory-tool.e2e.test.tssuite passes🤖 Generated with Claude Code
Greptile Summary
Changed
MemoryIndexManager.readFileto catchENOENTerrors and return{ text: "", path }instead of throwing, allowing the memory read tool to degrade gracefully when files don't exist yet (e.g., daily logs that haven't been created)fs.lstatcall inmanager.ts:440-452Confidence Score: 5/5
Last reviewed commit: d15ea24
(2/5) Greptile learns from your feedback when you react with thumbs up/down!