From a8f2101a30f7a91e0e78b207c1ea12f8b53a5bbd Mon Sep 17 00:00:00 2001 From: Yuhan Lei Date: Sat, 2 May 2026 18:16:28 +0800 Subject: [PATCH 1/2] fix: prefer native worktree tool in description --- packages/opencode/src/tool/enter-worktree.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/opencode/src/tool/enter-worktree.txt b/packages/opencode/src/tool/enter-worktree.txt index bf4a28e76..19e9db852 100644 --- a/packages/opencode/src/tool/enter-worktree.txt +++ b/packages/opencode/src/tool/enter-worktree.txt @@ -1,5 +1,11 @@ Bind this session to a git worktree. Once entered, every subsequent tool call resolves relative paths from inside the worktree until ExitWorktree is called. +Use this tool whenever the user asks to create, start, enter, open, switch to, or move current work into a worktree. + +This is the authoritative PawWork mechanism for session worktrees. Prefer it over skill-based worktree workflows and over shell-based `git worktree` commands, because only this tool binds the session execution context and makes subsequent tool calls resolve inside the worktree. + +Do not invoke a worktree skill first when this tool directly satisfies the user's request. + Use only when the user explicitly asks for worktree usage, or project instructions require it. Modes: From 67b990b060faea273cdfe66dd1d7018ba901690b Mon Sep 17 00:00:00 2001 From: Yuhan Lei Date: Sat, 2 May 2026 18:22:11 +0800 Subject: [PATCH 2/2] fix: clarify worktree tool session scope --- packages/opencode/src/tool/enter-worktree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/tool/enter-worktree.txt b/packages/opencode/src/tool/enter-worktree.txt index 19e9db852..8cce1d75c 100644 --- a/packages/opencode/src/tool/enter-worktree.txt +++ b/packages/opencode/src/tool/enter-worktree.txt @@ -1,6 +1,6 @@ Bind this session to a git worktree. Once entered, every subsequent tool call resolves relative paths from inside the worktree until ExitWorktree is called. -Use this tool whenever the user asks to create, start, enter, open, switch to, or move current work into a worktree. +Use this tool whenever the user asks to create, start, enter, open, or switch the session to a worktree. This is the authoritative PawWork mechanism for session worktrees. Prefer it over skill-based worktree workflows and over shell-based `git worktree` commands, because only this tool binds the session execution context and makes subsequent tool calls resolve inside the worktree.