Skip to content

task-observer: new-session updates from 2026-06-12#51

Open
divad12 wants to merge 1 commit into
masterfrom
task-observer/new-session-2026-06-12
Open

task-observer: new-session updates from 2026-06-12#51
divad12 wants to merge 1 commit into
masterfrom
task-observer/new-session-2026-06-12

Conversation

@divad12

@divad12 divad12 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Target

skill: .agents/skills/new-session/SKILL.md

Observations addressed

  • Observation 12 (journology/log.md): Reuse existing clean worktrees before creating another → changed: added check in Step 1 to inspect existing worktrees for a clean reusable candidate (git worktree list, check clean status and no branch-only commits) before invoking EnterWorktree

Generated by Claude Code

… new one

Adds a step to inspect existing worktrees for a clean reusable candidate
before invoking EnterWorktree. Prevents workspace sprawl when accidental
main-checkout work can be resolved by fast-forwarding an existing clean
worktree rather than creating another.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a71b7b2920

ℹ️ 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".

git worktree list --porcelain
```

For each listed worktree, check if it is clean (`git -C <path> status --short` returns nothing) and has no branch-only commits (`git -C <path> log <target>..HEAD` is empty). If a suitable clean worktree exists, fast-forward it to the target branch and use it — reusing an existing worktree avoids workspace sprawl. Only if no suitable clean worktree exists, use the `EnterWorktree` tool to create one. Let it generate a name, or use one the user provides.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude the main worktree from reuse candidates

When this runs from the main repo, git worktree list --porcelain includes the main worktree as the first listed worktree (I checked the command output in this repo). Because the main repo can be clean and have no <target>..HEAD commits, this instruction can select the main repo as the “suitable clean worktree”; then step 3 runs setup.sh, which explicitly exits when WORKTREE equals MAIN_REPO. Please tell agents to skip the current/main worktree before evaluating reusable candidates.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants