Skip to content

feat: add workspace_follow_symlinks setting for symlink-aware tool operations#3242

Merged
Hmbown merged 5 commits into
Hmbown:mainfrom
gaord:feat/workspace-follow-symlinks
Jun 18, 2026
Merged

feat: add workspace_follow_symlinks setting for symlink-aware tool operations#3242
Hmbown merged 5 commits into
Hmbown:mainfrom
gaord:feat/workspace-follow-symlinks

Conversation

@gaord

@gaord gaord commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Add workspace_follow_symlinks setting so walk-based tools and UI components follow symbolic links during directory traversal. See commit message for full details.

@gaord gaord requested a review from Hmbown as a code owner June 15, 2026 12:58

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the workspace_follow_symlinks configuration setting, allowing file discovery walks, @-mention completions, and search tools to traverse symbolic links. The review feedback identifies two high-severity issues with this implementation: first, a risk of infinite recursion or stack overflow in the manual recursive directory walker (collect_files_recursive) due to a lack of cycle detection; second, a failure in resolving non-existent paths (such as creating new files) inside symlinked directories that resolve outside the workspace, as the canonicalized ancestor check incorrectly rejects them.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread crates/tui/src/tools/search.rs
Comment thread crates/tui/src/tools/spec.rs
…erations

When workspace_follow_symlinks is enabled, walk-based tools and UI components follow symbolic links during directory traversal. A symlink inside the workspace that resolves outside is still allowed - the symlink path itself is the gate.

Changes: Add follow_symlinks to ToolContext; update resolve_path(); thread setting through file_search, search, project, project_tree; add to EngineConfig; wire through runtime_threads, main, ui; add to Workspace and file_mention; add to config UI; show restart-required hint; add to Settings with env-override support; update tests

Note: Requires restart for engine tools. UI-side effects apply immediately.
@gaord gaord force-pushed the feat/workspace-follow-symlinks branch from c6ce9e4 to b0f10c6 Compare June 15, 2026 14:54

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@Hmbown

Hmbown commented Jun 18, 2026

Copy link
Copy Markdown
Owner

great idea!!! thank you!

@Hmbown Hmbown merged commit 8f5d056 into Hmbown:main Jun 18, 2026
9 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