Skip to content

fix(computer): resolve a leading ~ in file tool paths to the computer's home - #2102

Merged
elie222 merged 2 commits into
elie222:mainfrom
tc3oliver:fix/file-tools-tilde-home
Oct 25, 2026
Merged

elie222 merged 2 commits into
elie222:mainfrom
tc3oliver:fix/file-tools-tilde-home

Conversation

@tc3oliver

@tc3oliver tc3oliver commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Why

A bot that writes ~/notes/expenses.jsonl with a file tool expects the file in its home directory, where its shell sees ~. The file tools treated ~ as an ordinary folder name, so on a team computer the file landed in a literal ~ directory under the bot's folder, and the bot's shell commands could not find it at the path it used.

What changed

File tool paths now treat a leading ~ or ~/ as the workspace root, the same way a leading / already works, both when resolving a path and when shortening it for display. ~name/x is left alone, and .. is still rejected.

On the Docker computer the workspace root is the shell's home, so file tools and shell now agree on ~. Hosted providers that keep the workspace in a rakazo-home folder under the user's home still differ from the shell, as they already do for /; that needs a provider-level change and is out of scope here.

How tested

New unit tests cover ~, ~/x, a backslash separator, ~/shared/..., ~x/y (not expanded) and ~/../x (still throws) on team computers, a dedicated-computer case, and a listing under ~/bots keeping its root path. They fail without the change. Lint and typecheck pass.

…'s home

File tools treated `~/notes/x` as a relative path, so on a team computer it
was written to `bots/<id>/~/notes/x`, a literal `~` directory the shell never
sees. The workspace root is the computer's home, so a leading `~` or `~/` now
resolves to that root, the same as a leading `/`. `..` is still rejected.
@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown

@tc3oliver is attempting to deploy a commit to the Inbox Zero Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge within its stated scope.

Summary

File tools now treat a leading ~ as the workspace root.

  • Computer file paths starting with ~ now point to the workspace root.

Reviews (2) · Last reviewed commit: "fix(computer): keep root display paths f..." · Reviewed by Greptile

@elie222
elie222 merged commit f750c2a into elie222:main Oct 25, 2026
25 of 26 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Playwright screenshots

No new feature frames; gallery is suite-vs-main drift.

Open screenshot gallery · Dashboard · CI run

Updated for commit 807efe9.

@tc3oliver
tc3oliver deleted the fix/file-tools-tilde-home branch November 13, 2026 05:07
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