Repository navigation
Know Codex's and Cursor's worktrees; open the README on the install - #2
Merged
Merged
Conversation
wt knew Claude Code's worktrees by the lock it takes while running in one. It now knows which agent made each worktree and which agent runs in it: - Claude Code's live in the repo, under .claude/worktrees/; Codex's in $CODEX_HOME/worktrees/<bucket>/<repo> (or desktop.git-worktree-root from its config.toml), detached and marked with codex-thread.json in their git directory; Cursor's in ~/.cursor/worktrees. Codex names every worktree after the repo, so wt names them codex/<bucket>. - After the first render, the agents' processes say which worktree each is running in: /proc on Linux, ps and lsof on macOS. ◆ marks a worktree an agent runs in (it can't be deleted from wt), ◇ one an agent made and left. - AGENTS is the table to add one to. The README opens on the install, and reads the same whatever the shell or system. Version 0.2.0. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Three things from review: the README should open with how to install, it shouldn't read as one person's setup (zsh, macOS), and
wtshould know Codex's worktrees the way it knows Claude Code's. Other agents should be one line to add.What
Coding agents.
wtknew Claude Code's worktrees only by the lock it takes while running in one. It now knows which agent made each worktree and which agent is running in it, for Claude Code, Codex and Cursor:.claude/worktrees/. Codex's live in$CODEX_HOME/worktrees/<4-hex bucket>/<repo>(or the rootdesktop.git-worktree-rootsets in itsconfig.toml), with detached HEADs, and Codex marks each withcodex-thread.jsonin its git directory; both signals are used. Cursor's live in~/.cursor/worktrees(as users report; Cursor doesn't document it). All of this is oneAGENTStable.wtshows them ascodex/<bucket>, which is also what you type to reach them./procon Linux,psthenlsofon macOS (lsofnames Claude's process after its versioned binary, sopsresolves names andlsofonly the directories). About 75ms, in the background like the statuses. Claude Code's lock still works without it.◆ codex(magenta) when an agent runs in the worktree,◇ codex(dim) when it made it and left. Delete is blocked while any agent runs in it; the confirmation notes a worktree an agent made.README. Opens on the install command, then requirements and what the installer does. The shell and system wording covers bash and zsh, macOS and Linux evenly; the sample picker is a generic repo. A "Coding agents" section explains the markers.
Verified: the live check found the three Claude Code sessions running in
front's worktrees; a simulated Codex layout (bucket, detached worktree, marker) lists and jumps ascodex/ab12. 27 tests, including the new ones on the agent functions.🤖 Generated with Claude Code