From f6a3bd76a9fc9c39a62fb03ed06292add1652537 Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Tue, 24 Feb 2026 10:14:47 -0500 Subject: [PATCH 1/6] fix: improve git advist in bash tool desc --- packages/opencode/src/tool/bash.txt | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/opencode/src/tool/bash.txt b/packages/opencode/src/tool/bash.txt index 47e9378e755..8db73d4b93c 100644 --- a/packages/opencode/src/tool/bash.txt +++ b/packages/opencode/src/tool/bash.txt @@ -51,17 +51,12 @@ Usage notes: Only create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully: Git Safety Protocol: -- NEVER update the git config +- You MUST onlye update the git config when explicitly asked to do so - NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them -- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it -- NEVER run force push to main/master, warn the user if they request it -- Avoid git commit --amend. ONLY use --amend when ALL conditions are met: - (1) User explicitly requested amend, OR commit SUCCEEDED but pre-commit hook auto-modified files that need including - (2) HEAD commit was created by you in this conversation (verify: git log -1 --format='%an %ae') - (3) Commit has NOT been pushed to remote (verify: git status shows "Your branch is ahead") -- CRITICAL: If commit FAILED or was REJECTED by hook, NEVER amend - fix the issue and create a NEW commit -- CRITICAL: If you already pushed to remote, NEVER amend unless user explicitly requests it (requires force push) -- NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive. +- You MUST only skip hooks (--no-verify, --no-gpg-sign, etc) to avoid push failures due to pre-existin errors in the dev branch or when user explicitly requests it +- You SHOULD only run force push to main/master when the user explicitly requests it +- CRITICAL: If you already pushed to remote, you may need to amend and use force push +- NEVER forget to commit changes and push changes to origin unless the user explicitly instructs you not to. It is VERY IMPORTANT that you NEVER forget to push changes you have made to origin, otherwise the user will feel that you are being lazy and forgetful. 1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel, each using the Bash tool: - Run a git status command to see all untracked files. From 47f205d21d99037756bd62f50f80dc9a84668544 Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Tue, 24 Feb 2026 10:43:39 -0500 Subject: [PATCH 2/6] fix: verbiage, spelling --- packages/opencode/src/tool/bash.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/tool/bash.txt b/packages/opencode/src/tool/bash.txt index 8db73d4b93c..edb5ad75368 100644 --- a/packages/opencode/src/tool/bash.txt +++ b/packages/opencode/src/tool/bash.txt @@ -53,7 +53,7 @@ Only create commits when requested by the user. If unclear, ask first. When the Git Safety Protocol: - You MUST onlye update the git config when explicitly asked to do so - NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them -- You MUST only skip hooks (--no-verify, --no-gpg-sign, etc) to avoid push failures due to pre-existin errors in the dev branch or when user explicitly requests it +- You MUST only skip hooks (--no-verify, --no-gpg-sign, etc) to avoid push failures due to pre-existing errors in the base branch or when user explicitly requests it - You SHOULD only run force push to main/master when the user explicitly requests it - CRITICAL: If you already pushed to remote, you may need to amend and use force push - NEVER forget to commit changes and push changes to origin unless the user explicitly instructs you not to. It is VERY IMPORTANT that you NEVER forget to push changes you have made to origin, otherwise the user will feel that you are being lazy and forgetful. From 02009cbae5ba79d21bd03e44ab094dd7c5e06bd1 Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Tue, 24 Feb 2026 12:48:19 -0500 Subject: [PATCH 3/6] fix: typo, whitespace --- packages/opencode/src/tool/bash.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/tool/bash.txt b/packages/opencode/src/tool/bash.txt index edb5ad75368..5ae89a722f2 100644 --- a/packages/opencode/src/tool/bash.txt +++ b/packages/opencode/src/tool/bash.txt @@ -51,11 +51,11 @@ Usage notes: Only create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully: Git Safety Protocol: -- You MUST onlye update the git config when explicitly asked to do so +- You MUST only update the git config when explicitly asked to do so - NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them - You MUST only skip hooks (--no-verify, --no-gpg-sign, etc) to avoid push failures due to pre-existing errors in the base branch or when user explicitly requests it - You SHOULD only run force push to main/master when the user explicitly requests it -- CRITICAL: If you already pushed to remote, you may need to amend and use force push +- CRITICAL: If you already pushed to remote, you may need to amend and use force push - NEVER forget to commit changes and push changes to origin unless the user explicitly instructs you not to. It is VERY IMPORTANT that you NEVER forget to push changes you have made to origin, otherwise the user will feel that you are being lazy and forgetful. 1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel, each using the Bash tool: From 0c54cbc4c3405c9ee4e58ecdbfa75be59b0d0f26 Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Tue, 24 Feb 2026 12:50:03 -0500 Subject: [PATCH 4/6] fix: verbiage --- packages/opencode/src/tool/bash.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/tool/bash.txt b/packages/opencode/src/tool/bash.txt index 5ae89a722f2..c177bb578fe 100644 --- a/packages/opencode/src/tool/bash.txt +++ b/packages/opencode/src/tool/bash.txt @@ -54,7 +54,7 @@ Git Safety Protocol: - You MUST only update the git config when explicitly asked to do so - NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them - You MUST only skip hooks (--no-verify, --no-gpg-sign, etc) to avoid push failures due to pre-existing errors in the base branch or when user explicitly requests it -- You SHOULD only run force push to main/master when the user explicitly requests it +- You SHOULD only run force push to main/master (or whatever the working branch's base branch is) when the user explicitly requests it - CRITICAL: If you already pushed to remote, you may need to amend and use force push - NEVER forget to commit changes and push changes to origin unless the user explicitly instructs you not to. It is VERY IMPORTANT that you NEVER forget to push changes you have made to origin, otherwise the user will feel that you are being lazy and forgetful. @@ -86,7 +86,7 @@ Use the gh command via the Bash tool for ALL GitHub-related tasks including work IMPORTANT: When the user asks you to create a pull request, follow these steps carefully: -1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged from the main branch: +1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged from the mainGive me the number again. branch: - Run a git status command to see all untracked files - Run a git diff command to see both staged and unstaged changes that will be committed - Check if the current branch tracks a remote branch and is up to date with the remote, so you know if you need to push to the remote From 3836df05645b6d93e50b6d63bf4a43209a1485d4 Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Mon, 2 Mar 2026 00:56:01 -0500 Subject: [PATCH 5/6] change: verbiage --- packages/opencode/src/tool/bash.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/opencode/src/tool/bash.txt b/packages/opencode/src/tool/bash.txt index c177bb578fe..dc5af13021b 100644 --- a/packages/opencode/src/tool/bash.txt +++ b/packages/opencode/src/tool/bash.txt @@ -51,9 +51,9 @@ Usage notes: Only create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully: Git Safety Protocol: -- You MUST only update the git config when explicitly asked to do so -- NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them -- You MUST only skip hooks (--no-verify, --no-gpg-sign, etc) to avoid push failures due to pre-existing errors in the base branch or when user explicitly requests it +- You SHOULD only update the git config when explicitly asks you to do so +- You SHOULD NOT run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them +- You SHOULD only skip hooks (--no-verify, --no-gpg-sign, etc) to avoid push failures due to pre-existing errors in the base branch or when user explicitly requests it - You SHOULD only run force push to main/master (or whatever the working branch's base branch is) when the user explicitly requests it - CRITICAL: If you already pushed to remote, you may need to amend and use force push - NEVER forget to commit changes and push changes to origin unless the user explicitly instructs you not to. It is VERY IMPORTANT that you NEVER forget to push changes you have made to origin, otherwise the user will feel that you are being lazy and forgetful. @@ -86,7 +86,7 @@ Use the gh command via the Bash tool for ALL GitHub-related tasks including work IMPORTANT: When the user asks you to create a pull request, follow these steps carefully: -1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged from the mainGive me the number again. branch: +1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. Run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged base branch - Run a git status command to see all untracked files - Run a git diff command to see both staged and unstaged changes that will be committed - Check if the current branch tracks a remote branch and is up to date with the remote, so you know if you need to push to the remote From 78a0beb6b22f144150eda7353e3bf3c5b6f5cd03 Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Wed, 4 Mar 2026 09:27:17 -0500 Subject: [PATCH 6/6] tweak: PR advice --- packages/opencode/src/tool/bash.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/opencode/src/tool/bash.txt b/packages/opencode/src/tool/bash.txt index dc5af13021b..458d085ba3b 100644 --- a/packages/opencode/src/tool/bash.txt +++ b/packages/opencode/src/tool/bash.txt @@ -84,6 +84,8 @@ Important notes: # Creating pull requests Use the gh command via the Bash tool for ALL GitHub-related tasks including working with issues, pull requests, checks, and releases. If given a GitHub URL use the gh command to get the information needed. +You SHOULD NOT create pull requests unless the user explicitly requests that you do so! + IMPORTANT: When the user asks you to create a pull request, follow these steps carefully: 1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. Run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged base branch