[BUG] Markdown file links resolve against launch directory, not the session's worktree, after EnterWorktree
Status Closed — duplicate
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 1 comment · opened Aug 19, 2026 · closed Aug 25, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Markdown file links resolve against launch directory, not the session's worktree, after EnterWorktree
They open from the original launch directory (the main checkout) — a stale copy on a different branch. Absolute paths in hrefs are the only workaround, and relative links inside rendered markdown files misresolve the same way.
The harness and the UI disagree about what "working directory" means after EnterWorktree — one of them should win consistently.
What Should Happen?
The file opens from the worktree (the session's working directory).
Error Messages/Logs
Steps to Reproduce
- Start a session in a repo checkout;
- the session calls EnterWorktree, which creates .claude/worktrees/<name> and moves the session's working directory there;
- the model emits [docs/README.md](docs/README.md) — correct per the system prompt's "path relative to the working directory" instruction;
- click the link in the desktop app.
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.32352.1
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Prior report #17927 was closed as stale without detail.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗