task-observer: new-session updates from 2026-05-06#11
Conversation
… one When recovering from accidental main-checkout work, reusing an existing clean worktree avoids workspace sprawl. Add a Worktree recovery section with commands to inspect and fast-forward a clean worktree instead of always spinning up a fresh one.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1eb649cbf9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| If a suitable worktree exists, fast-forward it to the target branch and assign its launch port instead of spinning up a new worktree: | ||
|
|
||
| ```bash | ||
| git -C <worktree-path> merge --ff-only <target> |
There was a problem hiding this comment.
Ensure recovery is on target branch before ff-update
The recovery step git -C <worktree-path> merge --ff-only <target> updates whatever branch is currently checked out in that worktree, not necessarily <target>. Since the preceding check only requires <target>..HEAD to be empty, a clean worktree on main can still pass and then fast-forward main to the feature tip, silently moving the local main ref. This can create confusing branch state for subsequent pulls/merges; the instructions should require/switch to <target> before applying the fast-forward update.
Useful? React with 👍 / 👎.
Target
skill:
.agents/skills/new-session/SKILL.mdObservations addressed
Generated by Claude Code