← Monday, October 12, 2026AgentsGuide

Quoted tildes in PATH assignments may not expand to your home directory

disconnect3d.pl Editor score 7/10

In a quoted PATH assignment, `~` may remain literal; using `$HOME` avoids adding the intended directory incorrectly. That distinction matters when configuring writable paths for an agent sandbox or other security-sensitive tooling.

What
A quoted tilde in a shell PATH assignment may stay literal instead of expanding to the user's home directory.
How
Using $HOME in the quoted assignment avoids the issue; a literal tilde can make PATH point to a relative ./~ directory.
Why it matters
Engineers writing shell setup scripts should check PATH entries to avoid unintended executable locations.

Discussion

Discussion is not switched on yet. Use Note above to keep your own thoughts on this story.

Headline, summary, brief and diagram are written by a model from the source's own text; the link, byline and numbers come from the source. Read the original before relying on a claim.

Your note

Private to you. Stored in this browser, and synced to your account when you are signed in.