Before submitting
Area
apps/web
Steps to reproduce
- Have a git repo whose root is a parent of the project, e.g. repo at
~/school with the T3 project registered at ~/school/physics (git rev-parse --show-toplevel from the project prints ~/school).
- In a thread on that project, ask the agent to create
notes/outline.md and commit it.
- The agent refers to the file the way git printed it, relative to the repo root:
`physics/notes/outline.md`.
- Click the file chip.
Expected behavior
The chip opens ~/school/physics/notes/outline.md.
Actual behavior
The path is joined onto the project root, so the chip resolves to ~/school/physics/physics/notes/outline.md (the tooltip shows this). The files panel opens a tab with breadcrumb physics > physics > notes > outline.md and shows:
Failed to read workspace file 'physics/notes/outline.md' in '~/school/physics'.
Opening the same file from the Files tab works. The agent's cwd was the project root, so the path was correct from git's point of view, not a hallucination.
Impact
Minor bug or occasional failure
Version or commit
main @ bd89c13
Environment
macOS, desktop/web client, Claude provider (any agent that echoes git paths is affected).
Notes
resolveMarkdownFileLinkTarget / resolveInlineCodeFileLinkMeta (apps/web/src/markdown-links.ts) join every relative path onto the thread cwd via resolvePathLinkTarget. The click-time basename rescue only covers slash-free names.
The diff panel already solves this exact mismatch: resolveDiffPathForWorkspace in apps/web/src/diffFileActions.ts uses project.repositoryIdentity.rootPath to strip the project's repo-relative prefix. Chat file links could do the same: when the project root is a strict subdirectory of the repo root (and the thread is not on a worktree), a relative path that starts with the project's repo-relative prefix (physics/) gets that prefix stripped. The only misfire would be a project with a real child folder named like its own repo-relative path, which seems acceptable, or it could be resolved with a click-time existence check.
Mobile's resolveFileChipTarget (apps/mobile/src/features/threads/fileChipMenu.ts) has the same join and should get the same treatment.
Related, not a duplicate: #10553 (agent cds into a different project's checkout; no repo information can resolve that one).
Workaround
Open the file from the Files tab, or ask the agent for absolute paths.
Before submitting
Area
apps/web
Steps to reproduce
~/schoolwith the T3 project registered at~/school/physics(git rev-parse --show-toplevelfrom the project prints~/school).notes/outline.mdand commit it.`physics/notes/outline.md`.Expected behavior
The chip opens
~/school/physics/notes/outline.md.Actual behavior
The path is joined onto the project root, so the chip resolves to
~/school/physics/physics/notes/outline.md(the tooltip shows this). The files panel opens a tab with breadcrumbphysics > physics > notes > outline.mdand shows:Opening the same file from the Files tab works. The agent's cwd was the project root, so the path was correct from git's point of view, not a hallucination.
Impact
Minor bug or occasional failure
Version or commit
main @ bd89c13
Environment
macOS, desktop/web client, Claude provider (any agent that echoes git paths is affected).
Notes
resolveMarkdownFileLinkTarget/resolveInlineCodeFileLinkMeta(apps/web/src/markdown-links.ts) join every relative path onto the thread cwd viaresolvePathLinkTarget. The click-time basename rescue only covers slash-free names.The diff panel already solves this exact mismatch:
resolveDiffPathForWorkspaceinapps/web/src/diffFileActions.tsusesproject.repositoryIdentity.rootPathto strip the project's repo-relative prefix. Chat file links could do the same: when the project root is a strict subdirectory of the repo root (and the thread is not on a worktree), a relative path that starts with the project's repo-relative prefix (physics/) gets that prefix stripped. The only misfire would be a project with a real child folder named like its own repo-relative path, which seems acceptable, or it could be resolved with a click-time existence check.Mobile's
resolveFileChipTarget(apps/mobile/src/features/threads/fileChipMenu.ts) has the same join and should get the same treatment.Related, not a duplicate: #10553 (agent
cds into a different project's checkout; no repo information can resolve that one).Workaround
Open the file from the Files tab, or ask the agent for absolute paths.