-
Notifications
You must be signed in to change notification settings - Fork 4
task-observer: new-session updates from 2026-05-01 #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ Set up a worktree with everything needed to run the dev server - env files copie | |
| ``` | ||
| If the current working directory is already inside `.claude/worktrees/`, you're in a worktree that was created externally (e.g. by Claude Code desktop). Skip to step 3. | ||
|
|
||
| If you're in the main repo, use the `EnterWorktree` tool to create one. Let it generate a name (or use one the user provides). | ||
| If you're in the main repo, first run `git worktree list` to check whether a clean existing worktree is available on the target branch. If one exists with no uncommitted changes, prefer it over creating a new one — reusing minimises workspace sprawl and stale port locks. Only create a new worktree when no suitable one exists, then use the `EnterWorktree` tool. Let it generate a name (or use one the user provides). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The instruction says to use Useful? React with 👍 / 👎. |
||
|
|
||
| 2. **Identify the main repo root.** | ||
| The main repo is always the entry in `git worktree list` with `[main]`: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new reuse rule can accidentally select the main checkout as the “clean existing worktree” (especially when the target branch is
main), becausegit worktree listincludes the main repo entry as well; step 2 in this same file even relies on that[main]entry. If that happens, the rest of the flow runs in the main repo instead of an isolated worktree, which can lead to accidental main-branch edits/commits and incorrect worktree port-lock setup. Add an explicit guard that reusable candidates must be linked worktrees (e.g., under.claude/worktrees/) and never the[main]entry.Useful? React with 👍 / 👎.