prompt.ts · part 1
Full reference32 text occurrences from packages/opencode/src/tool/shell/prompt.ts, part 1. Every entry preserves the shipped literal and its saved verdict or selection reason.
File contents and all parts · All files
Shipped text
The command to execute
Source: packages/opencode/src/tool/shell/prompt.ts, characters 456–480, SHA-256 a31feff404100be4.
Jev judged not model-facing (confidence 0.79; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: The command to execute
The command to execute
Optional timeout in milliseconds
Source: packages/opencode/src/tool/shell/prompt.ts, characters 551–585, SHA-256 cbcdc90c7e5274c2.
Jev judged not model-facing (confidence 0.75; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Optional timeout in milliseconds
Optional timeout in milliseconds
The working directory to run the command in. Defaults to the current directory.
Source: packages/opencode/src/tool/shell/prompt.ts, characters 664–780, SHA-256 3225a42cc34eea22.
Jev judged model-facing (confidence 0.83; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands.
The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands.
Missing shell prompt value: ${key}
Source: packages/opencode/src/tool/shell/prompt.ts, characters 1119–1155, SHA-256 0e3fea2bc8f4fa36.
Jev judged not model-facing (confidence 0.1; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Missing shell prompt value: ${key}
Missing shell prompt value: ${key}
Windows PowerShell (5.1)
Source: packages/opencode/src/tool/shell/prompt.ts, characters 1308–1334, SHA-256 11274f9aa6100e1f.
Jev judged not model-facing (confidence 0.11; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Windows PowerShell (5.1)
Windows PowerShell (5.1)
PowerShell (7+) shell notes - This cross-platform shell supports pipeline chai
Source: packages/opencode/src/tool/shell/prompt.ts, characters 1468–2050, SHA-256 e502ca5acfb2d2f5.
Jev judged not model-facing (confidence 0.72; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: # PowerShell (7+) shell notes - This cross-platform shell supports pipeline chain operators ('&&' and '||'). - Use double quotes for interpolated strings ('"Hello $name"'), single quotes for verbatim strings. - Prefer full cmdlet names like…
# PowerShell (7+) shell notes
- This cross-platform shell supports pipeline chain operators (`&&` and `||`).
- Use double quotes for interpolated strings (`"Hello $name"`), single quotes for verbatim strings.
- Prefer full cmdlet names like `Get-ChildItem`, `Set-Content`, `Remove-Item`, and `New-Item` over aliases.
- Use `$(...)` for subexpressions. Use `@(...)` for array expressions.
- To call a native executable whose path contains spaces, use the call operator: `& "path/to/exe" args`.
- Escape special characters with the PowerShell backtick character.
Windows PowerShell (5.1) shell notes - Use cmd1; if ($?) { cmd2 } to chain d
Source: packages/opencode/src/tool/shell/prompt.ts, characters 2097–2667, SHA-256 f94b1d6240880874.
Jev judged not model-facing (confidence 0.81; role documentation). This is a classifier judgment, not proof of delivery.
Readable text: # Windows PowerShell (5.1) shell notes - Use 'cmd1; if ($?) { cmd2 }' to chain dependent commands. - Use double quotes for interpolated strings ('"Hello $name"'), single quotes for verbatim strings. - Prefer full cmdlet names like 'Get-Chil…
# Windows PowerShell (5.1) shell notes
- Use `cmd1; if ($?) { cmd2 }` to chain dependent commands.
- Use double quotes for interpolated strings (`"Hello $name"`), single quotes for verbatim strings.
- Prefer full cmdlet names like `Get-ChildItem`, `Set-Content`, `Remove-Item`, and `New-Item` over aliases.
- Use `$(...)` for subexpressions. Use `@(...)` for array expressions.
- To call a native executable whose path contains spaces, use the call operator: `& "path/to/exe" args`.
- Escape special characters with the PowerShell backtick character.
If the commands depend on each other and must run sequentially, avoid ' ' in th
Source: packages/opencode/src/tool/shell/prompt.ts, characters 2768–3025, SHA-256 fa15b5688b41050e.
Jev judged not model-facing (confidence 0.83; role code_data). This is a classifier judgment, not proof of delivery.
Readable form: a shipped code or data literal beginning “If the commands depend on each other and must run sequentially, avoid ' ' in th”. The exact literal is preserved below; its runtime purpose requires the surrounding source.
If the commands depend on each other and must run sequentially, avoid '&&' in this shell because Windows PowerShell (5.1) does not support it. Use PowerShell conditionals such as `cmd1; if ($?) { cmd2 }` when later commands must depend on earlier success.
If the commands depend on each other and must run sequentially, use a single bas
Source: packages/opencode/src/tool/shell/prompt.ts, characters 3063–3463, SHA-256 6e1454e64925026e.
Jev judged model-facing (confidence 0.86; role tool). This is a classifier judgment, not proof of delivery.
Readable text: If the commands depend on each other and must run sequentially, use a single bash tool call with '&&' to chain them together (e.g., 'git add . && git commit -m "message" && git push'). For instance, if one operation must complete before ano…
If the commands depend on each other and must run sequentially, use a single bash tool call with '&&' to chain them together (e.g., `git add . && git commit -m "message" && git push`). For instance, if one operation must complete before another starts (like New-Item before Copy-Item, Write before bash for git operations, or git add before git commit), run these operations sequentially instead.
If the commands depend on each other and must run sequentially, use a single bas · character 3502
Source: packages/opencode/src/tool/shell/prompt.ts, characters 3502–3771, SHA-256 31a99b92a5ce357c.
Jev judged model-facing (confidence 0.83; role instructions). This is a classifier judgment, not proof of delivery.
Readable text: If the commands depend on each other and must run sequentially, use a single bash tool call with '&&' to chain them together (e.g., 'mkdir out && dir out'). For instance, if one operation must complete before another starts, run these opera…
If the commands depend on each other and must run sequentially, use a single bash tool call with `&&` to chain them together (e.g., `mkdir out && dir out`). For instance, if one operation must complete before another starts, run these operations sequentially instead.
If the commands depend on each other and must run sequentially, use a single Bas
Source: packages/opencode/src/tool/shell/prompt.ts, characters 3785–4170, SHA-256 b152f84794b096be.
Jev judged model-facing (confidence 0.9; role instructions). This is a classifier judgment, not proof of delivery.
Readable text: If the commands depend on each other and must run sequentially, use a single Bash call with '&&' to chain them together (e.g., 'git add . && git commit -m "message" && git push'). For instance, if one operation must complete before another …
If the commands depend on each other and must run sequentially, use a single Bash call with '&&' to chain them together (e.g., `git add . && git commit -m "message" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.
Before executing the command, please follow these steps: 1. Directory Verificati
Source: packages/opencode/src/tool/shell/prompt.ts, characters 4270–7015, SHA-256 b5b79155add97691.
Not classified: Source failed the privacy boundary.
Readable text: Before executing the command, please follow these steps: 1. Directory Verification: - If the command will create new directories or files, first use \'ls\' to verify the parent directory exists and is the correct location - For examp…
Before executing the command, please follow these steps:
1. Directory Verification:
- If the command will create new directories or files, first use \`ls\` to verify the parent directory exists and is the correct location
- For example, before running "mkdir foo/bar", first use \`ls foo\` to check that "foo" exists and is the intended parent directory
2. Command Execution:
- Always quote file paths that contain spaces with double quotes (e.g., rm "path with spaces/file.txt")
- Examples of proper quoting:
- mkdir "/Users/name/My Documents" (correct)
- mkdir /Users/name/My Documents (incorrect - will fail)
- python "/path/with spaces/script.py" (correct)
- python /path/with spaces/script.py (incorrect - will fail)
- After ensuring proper quoting, execute the command.
- Capture the output of the command.
Usage notes:
- The command argument is required.
- You can specify an optional timeout in milliseconds. If not specified, commands will time out after ${defaultTimeoutMs}ms.
- If the output exceeds ${limits.maxLines} lines or ${limits.maxBytes} bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use \`head\`, \`tail\`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.
- Avoid using Bash with the \`find\`, \`grep\`, \`cat\`, \`head\`, \`tail\`, \`sed\`, \`awk\`, or \`echo\` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:
- File search: Use Glob (NOT find or ls)
- Content search: Use Grep (NOT grep or rg)
- Read files: Use Read (NOT cat/head/tail)
- Edit files: Use Edit (NOT sed/awk)
- Write files: Use Write (NOT echo >/cat <<EOF)
- Communication: Output text directly (NOT echo/printf)
- When issuing multiple commands:
- If the commands are independent and can run in parallel, make multiple bash tool calls in a single message. For example, if you need to run "git status" and "git diff", send a single message with two bash tool calls in parallel.
- ${chain}
- Use ';' only when you need to run commands sequentially but don't care if earlier commands fail
- DO NOT use newlines to separate commands (newlines are ok in quoted strings)
- AVOID using \`cd <directory> && <command>\`. Use the \`workdir\` parameter to change directories instead.
<good-example>
Use workdir="/foo/bar" with command: pytest tests
</good-example>
<bad-example>
cd /foo/bar && pytest tests
</bad-example>
${powershellNotes(name)} Before executing the command, please follow these steps
Source: packages/opencode/src/tool/shell/prompt.ts, characters 7165–10270, SHA-256 3645e50c0f500d56.
Jev judged model-facing (confidence 0.94; role tool). This is a classifier judgment, not proof of delivery.
Readable text: ${powershellNotes(name)} Before executing the command, please follow these steps: 1. Directory Verification: - If the command will create new directories or files, first use \'Test-Path -LiteralPath <parent>\' to verify the parent dire…
${powershellNotes(name)}
Before executing the command, please follow these steps:
1. Directory Verification:
- If the command will create new directories or files, first use \`Test-Path -LiteralPath <parent>\` to verify the parent directory exists and is the correct location
- For example, before creating \`foo${pathSep}bar\`, first use \`Test-Path -LiteralPath "foo"\` to check that \`foo\` exists and is the intended parent directory
2. Command Execution:
- Always quote file paths that contain spaces with double quotes (e.g., Remove-Item -LiteralPath "path with spaces${pathSep}file.txt")
- Examples of proper quoting:
- New-Item -ItemType Directory -Path "My Documents" (correct)
- New-Item -ItemType Directory -Path My Documents (incorrect - path is split)
- & "path with spaces${pathSep}script.ps1" (correct)
- path with spaces${pathSep}script.ps1 (incorrect - path is split and not invoked)
- After ensuring proper quoting, execute the command.
- Capture the output of the command.
Usage notes:
- The command argument is required.
- You can specify an optional timeout in milliseconds. If not specified, commands will time out after ${defaultTimeoutMs}ms.
- If the output exceeds ${limits.maxLines} lines or ${limits.maxBytes} bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use \`Select-Object -First\`, \`Select-Object -Last\`, or other truncation commands to limit output; the full output will already be captured to a file for more precise searching.
- Avoid using Shell with PowerShell file/content cmdlets unless explicitly instructed or when these cmdlets are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:
- File search: Use Glob (NOT Get-ChildItem)
- Content search: Use Grep (NOT Select-String)
- Read files: Use Read (NOT Get-Content)
- Edit files: Use Edit (NOT Set-Content)
- Write files: Use Write (NOT Set-Content/Out-File or here-strings)
- Communication: Output text directly (NOT Write-Output/Write-Host)
- When issuing multiple commands:
- If the commands are independent and can run in parallel, make multiple bash tool calls in a single message. For example, if you need to run "git status" and "git diff", send a single message with two bash tool calls in parallel.
- ${chain}
- Use \`;\` only when you need to run commands sequentially but don't care if earlier commands fail
- DO NOT use newlines to separate commands (newlines are ok in quoted strings)
- AVOID changing directories inside the command. Use the \`workdir\` parameter to change directories instead.
<good-example>
Use workdir="project${pathSep}subdir" with command: pytest tests
</good-example>
<bad-example>
${name === "powershell" ? `Set-Location -LiteralPath "project${pathSep}subdir"; if ($?) { pytest tests }` : `Set-Location -LiteralPath "project${pathSep}subdir" && pytest tests`}
</bad-example>
cmd.exe shell notes - Use double quotes for paths with spaces. - Use %VAR% for
Source: packages/opencode/src/tool/shell/prompt.ts, characters 10369–13261, SHA-256 22402d2c3aefbb7a.
Jev judged model-facing (confidence 0.93; role tool). This is a classifier judgment, not proof of delivery.
Readable text: # cmd.exe shell notes - Use double quotes for paths with spaces. - Use %VAR% for environment variables. - Use \'if exist\' for existence checks. - Use \'call\' when invoking batch files from another batch-style command. Before executing th…
# cmd.exe shell notes
- Use double quotes for paths with spaces.
- Use %VAR% for environment variables.
- Use \`if exist\` for existence checks.
- Use \`call\` when invoking batch files from another batch-style command.
Before executing the command, please follow these steps:
1. Directory Verification:
- If the command will create new directories or files, first use \`if exist\` to verify the parent directory exists and is the correct location
- For example, before creating \`foo\\bar\`, first use \`if exist "foo\\" dir "foo"\` to check that \`foo\` exists and is the intended parent directory
2. Command Execution:
- Always quote file paths that contain spaces with double quotes (e.g., del "path with spaces\\file.txt")
- Examples of proper quoting:
- mkdir "My Documents" (correct)
- mkdir My Documents (incorrect - path is split)
- call "path with spaces\\script.bat" (correct)
- path with spaces\\script.bat (incorrect - path is split and not invoked correctly)
- After ensuring proper quoting, execute the command.
- Capture the output of the command.
Usage notes:
- The command argument is required.
- You can specify an optional timeout in milliseconds. If not specified, commands will time out after ${defaultTimeoutMs}ms.
- If the output exceeds ${limits.maxLines} lines or ${limits.maxBytes} bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Do NOT use \`more\` or other pagination commands to limit output; the full output will already be captured to a file for more precise searching.
- Avoid using Shell with cmd.exe file/content commands unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:
- File search: Use Glob (NOT dir /s)
- Content search: Use Grep (NOT findstr)
- Read files: Use Read (NOT type)
- Edit files: Use Edit (NOT copy)
- Write files: Use Write (NOT echo > file)
- Communication: Output text directly (NOT echo)
- When issuing multiple commands:
- If the commands are independent and can run in parallel, make multiple bash tool calls in a single message. For example, if you need to run "dir" and "where cmd", send a single message with two bash tool calls in parallel.
- ${chain}
- Use \`&\` only when you need to run commands sequentially but don't care if earlier commands fail
- DO NOT use newlines to separate commands (newlines are ok in quoted strings)
- AVOID changing directories inside the command. Use the \`workdir\` parameter to change directories instead.
<good-example>
Use workdir="project\\subdir" with command: dir
</good-example>
<bad-example>
cd /d "project\\subdir" && dir
</bad-example>
Executes a given ${shellDisplayName(name)} command with optional timeout, ensuri
Source: packages/opencode/src/tool/shell/prompt.ts, characters 13488–13611, SHA-256 93b70e5f77dd4711.
Jev judged model-facing (confidence 0.83; role tool). This is a classifier judgment, not proof of delivery.
Readable text: Executes a given ${shellDisplayName(name)} command with optional timeout, ensuring proper handling and security measures.
Executes a given ${shellDisplayName(name)} command with optional timeout, ensuring proper handling and security measures.
All commands run in the current working directory by default. Use the workdir
Source: packages/opencode/src/tool/shell/prompt.ts, characters 13643–13860, SHA-256 29351d7fb3ca2816.
Jev judged model-facing (confidence 0.9; role tool). This is a classifier judgment, not proof of delivery.
Readable text: All commands run in the current working directory by default. Use the 'workdir' parameter if you need to run a command in a different directory. AVOID changing directories inside the command - use 'workdir' instead.
All commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID changing directories inside the command - use `workdir` instead.
git commands
Source: packages/opencode/src/tool/shell/prompt.ts, characters 13955–13969, SHA-256 7f85e2744d3e4620.
Jev judged not model-facing (confidence 0.47; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: git commands
git commands
git commands · character 14000
Source: packages/opencode/src/tool/shell/prompt.ts, characters 14000–14014, SHA-256 7f85e2744d3e4620.
Jev judged not model-facing (confidence 0.5; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: git commands
git commands
Create PR using a temporary body file so cmd.exe quoting stays simple.
Source: packages/opencode/src/tool/shell/prompt.ts, characters 14043–14115, SHA-256 592814f39547bce4.
Jev judged not model-facing (confidence 0.76; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Create PR using a temporary body file so cmd.exe quoting stays simple.
Create PR using a temporary body file so cmd.exe quoting stays simple.
( echo Summary echo - ^ 1-3 bullet points^ ) pr-body.txt gh pr create --ti
Source: packages/opencode/src/tool/shell/prompt.ts, characters 14140–14272, SHA-256 d5ca2333362fbaaa.
Jev judged not model-facing (confidence 0.27; role documentation). This is a classifier judgment, not proof of delivery.
Readable text: ( echo ## Summary echo - ^<1-3 bullet points^> ) > pr-body.txt gh pr create --title "the pr title" --body-file pr-body.txt
(
echo ## Summary
echo - ^<1-3 bullet points^>
) > pr-body.txt
gh pr create --title "the pr title" --body-file pr-body.txt
Executes a given ${shellDisplayName(name)} command with optional timeout, ensuri · character 14332
Source: packages/opencode/src/tool/shell/prompt.ts, characters 14332–14455, SHA-256 93b70e5f77dd4711.
Jev judged model-facing (confidence 0.83; role tool). This is a classifier judgment, not proof of delivery.
Readable text: Executes a given ${shellDisplayName(name)} command with optional timeout, ensuring proper handling and security measures.
Executes a given ${shellDisplayName(name)} command with optional timeout, ensuring proper handling and security measures.
All commands run in the current working directory by default. Use the workdir · character 14487
Source: packages/opencode/src/tool/shell/prompt.ts, characters 14487–14704, SHA-256 29351d7fb3ca2816.
Jev judged model-facing (confidence 0.92; role tool). This is a classifier judgment, not proof of delivery.
Readable text: All commands run in the current working directory by default. Use the 'workdir' parameter if you need to run a command in a different directory. AVOID changing directories inside the command - use 'workdir' instead.
All commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID changing directories inside the command - use `workdir` instead.
git commands · character 14896
Source: packages/opencode/src/tool/shell/prompt.ts, characters 14896–14910, SHA-256 7f85e2744d3e4620.
Jev judged not model-facing (confidence 0.48; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: git commands
git commands
git commands · character 14941
Source: packages/opencode/src/tool/shell/prompt.ts, characters 14941–14955, SHA-256 7f85e2744d3e4620.
Jev judged not model-facing (confidence 0.51; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: git commands
git commands
Create PR using gh pr create with a PowerShell here-string to pass the body corr
Source: packages/opencode/src/tool/shell/prompt.ts, characters 14984–15072, SHA-256 e22aafba8ed6ccbb.
Jev judged model-facing (confidence 0.82; role instructions). This is a classifier judgment, not proof of delivery.
Readable text: Create PR using gh pr create with a PowerShell here-string to pass the body correctly.
Create PR using gh pr create with a PowerShell here-string to pass the body correctly.
gh pr create --title "the pr title" --body @' Summary - 1-3 bullet points '
Source: packages/opencode/src/tool/shell/prompt.ts, characters 15097–15180, SHA-256 b489cf0fb5c3f566.
Jev judged not model-facing (confidence 0.31; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: gh pr create --title "the pr title" --body @' ## Summary - <1-3 bullet points> '@
gh pr create --title "the pr title" --body @'
## Summary
- <1-3 bullet points>
'@
Executes a given bash command in a persistent shell session with optional timeou
Source: packages/opencode/src/tool/shell/prompt.ts, characters 15220–15352, SHA-256 cb80d2a8c6b80331.
Jev judged model-facing (confidence 0.84; role tool). This is a classifier judgment, not proof of delivery.
Readable text: Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.
Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.
All commands run in the current working directory by default. Use the workdir · character 15380
Source: packages/opencode/src/tool/shell/prompt.ts, characters 15380–15602, SHA-256 3ba2e6818566bee3.
Jev judged model-facing (confidence 0.91; role tool). This is a classifier judgment, not proof of delivery.
Readable text: All commands run in the current working directory by default. Use the 'workdir' parameter if you need to run a command in a different directory. AVOID using 'cd <directory> && <command>' patterns - use 'workdir' instead.
All commands run in the current working directory by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.
bash commands
Source: packages/opencode/src/tool/shell/prompt.ts, characters 15694–15709, SHA-256 52d4458dac83b247.
Jev judged not model-facing (confidence 0.43; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: bash commands
bash commands
git bash commands
Source: packages/opencode/src/tool/shell/prompt.ts, characters 15738–15757, SHA-256 db514417e15ef38e.
Jev judged not model-facing (confidence 0.56; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: git bash commands
git bash commands
Create PR using gh pr create with the format below. Use a HEREDOC to pass the bo
Source: packages/opencode/src/tool/shell/prompt.ts, characters 15790–15904, SHA-256 d3af5633c5f0b38a.
Jev judged model-facing (confidence 0.89; role instructions). This is a classifier judgment, not proof of delivery.
Readable text: Create PR using gh pr create with the format below. Use a HEREDOC to pass the body to ensure correct formatting.
Create PR using gh pr create with the format below. Use a HEREDOC to pass the body to ensure correct formatting.
gh pr create --title "the pr title" --body "$(cat 'EOF' Summary 1-3 bullet
Source: packages/opencode/src/tool/shell/prompt.ts, characters 15927–16017, SHA-256 76d3985c535217a1.
Jev judged not model-facing (confidence 0.43; role documentation). This is a classifier judgment, not proof of delivery.
Readable text: gh pr create --title "the pr title" --body "$(cat <<'EOF' ## Summary <1-3 bullet points>
gh pr create --title "the pr title" --body "$(cat <<'EOF'
## Summary
<1-3 bullet points>