Note
Grok responding on behalf of Julius.
Triage
Thanks @boundsj for the clear report. Reading current main, this looks like a real bug, and I don't see an existing issue for it. A project whose workspace is a subdirectory of a Git repository keeps that directory for a local thread, but a new worktree drops it and starts at the checkout root. That would explain why subdirectory skills disappear for Codex and Claude.
What I found
- Worktrees are always the repo root.
git worktree addchecks out the repository root at the worktree path (GitVcsDriverCore.createWorktree). The thread stores that path, and the session cwd prefersthread.worktreePathoverproject.workspaceRoot(RuntimePolicyV2.resolve). - Skills follow that cwd. The composer looks up skills at the same path (
projectScriptCwd, thenresolveProviderSkillsForCwdon web and mobile). Claude skills are read from<cwd>/.claude/skills, and Codexskills/listis called with that cwd, so skills that live under the subdirectory aren't the ones discovered, and the agent isn't started there. Terminals and the files view use this cwd too.
Likely fix area
Worktree creation / RuntimePolicyV2.resolve and skill discovery. One option: take the project's path relative to the repository root (e.g. ios) and use <worktree>/ios as the agent cwd and the skill-discovery cwd, while keeping the stored worktree path as the checkout root (that's where Git created the tree). A project that already is the repository root would stay unchanged.
A maintainer will decide on the fix direction.