Skip to content

Handle rg execution failures in memory search - #96

Merged
study8677 merged 1 commit into
mainfrom
codex/memory-rg-fallback-lling0000
Jul 7, 2026
Merged

Handle rg execution failures in memory search#96
study8677 merged 1 commit into
mainfrom
codex/memory-rg-fallback-lling0000

Conversation

@Lling0000

Copy link
Copy Markdown
Collaborator

Summary

  • fall back to the Python memory search implementation when rg exists but cannot be executed
  • add a regression test that simulates PermissionError from subprocess.run

Why

search_memory_md() already has a Python fallback for environments without ripgrep, but Windows environments can also raise PermissionError when rg.exe is present but blocked from execution. In that case the function crashed instead of using the fallback.

Validation

  • python -m pytest engine/tests/test_memory_tools.py -q

@study8677
study8677 marked this pull request as ready for review July 7, 2026 08:32
@study8677
study8677 merged commit ab746df into main Jul 7, 2026
16 checks 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.

2 participants