Skip to content

fix: handle symlink loops causing RuntimeError in Path.resolve()#5223

Open
Sarthak816 wants to merge 1 commit into
Aider-AI:mainfrom
Sarthak816:fix/5146-symlink-loop-runtime-error
Open

fix: handle symlink loops causing RuntimeError in Path.resolve()#5223
Sarthak816 wants to merge 1 commit into
Aider-AI:mainfrom
Sarthak816:fix/5146-symlink-loop-runtime-error

Conversation

@Sarthak816
Copy link
Copy Markdown

When resolving paths with Path.resolve(), symlink loops raise RuntimeError on Python 3.12+ and crash aider.

This fix ensures safe_abs_path() catches RuntimeError alongside OSError, and
updates other raw .resolve() calls in base_coder.py and repo.py to use the same
safe pattern.

Closes #5146

When resolving paths with Path.resolve(), symlink loops raise RuntimeError on Python 3.12+.\n\nThis fix ensures safe_abs_path() catches RuntimeError alongside OSError, and\nupdates other raw .resolve() calls in base_coder.py and repo.py to use the same\nsafe pattern.\n\nCloses Aider-AI#5146
@Sarthak816 Sarthak816 force-pushed the fix/5146-symlink-loop-runtime-error branch from 76593d1 to 85997f0 Compare June 6, 2026 06:35
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.

Uncaught RuntimeError in pathlib.py line 1239

1 participant