main.js · part 239
Full reference60 text occurrences from desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, part 239. Every entry preserves the shipped literal and its saved verdict or selection reason.
File contents and all parts · All files
Shipped text
You can monitor commands by configuring notify on output . You will be notified
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7724878–7725708, SHA-256 d33a472cd5625189.
Jev judged not model-facing (confidence 0.68; role tool). This is a classifier judgment, not proof of delivery.
Readable form: a shipped code or data literal beginning “You can monitor commands by configuring notify on output . You will be notified”. The exact literal is preserved below; its runtime purpose requires the surrounding source.
You can monitor commands by configuring `notify_on_output`. You will be notified at the end of your turn whenever stdout/stderr output matches the regex `pattern` (do not match all outputs). Output redirected only to a file will not trigger it. You will only receive notifications after ending your turn. Configure a 5 or less words `reason` which explains what you are watching for. The UI will prefix it as "Monitored `reason`". Configure `debounce_ms` to control how many milliseconds must elapse between notifications; the harness treats values less than 5000ms as 5000ms. Configure shell commands to emit stable sentinel lines and simple anchored regexes; pipe noisy output through jq/awk/scripts if needed. The system will terminate the watcher if the notifications are overly noisy, and you will be informed in this case.
Completion notifications are delivered separately from output-match notification
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7725732–7725864, SHA-256 e2e5e0fc7c230123.
Jev judged not model-facing (confidence 0.22; role context). This is a classifier judgment, not proof of delivery.
Readable text: Completion notifications are delivered separately from output-match notifications and do not require 'notify_on_output' to be set.
Completion notifications are delivered separately from output-match notifications and do not require `notify_on_output` to be set.
Only poll with
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7725889–7725906, SHA-256 125c3e1511d950ff.
Jev judged not model-facing (confidence 0.19; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Only poll with
Only poll with
later if you have been asked to work on something that requires the result of a
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7725918–7726034, SHA-256 fbb8982aede1f8de.
Jev judged not model-facing (confidence 0.34; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: later if you have been asked to work on something that requires the result of a previous shell command. Using the
later if you have been asked to work on something that requires the result of a previous shell command. Using the
is very disruptive because it prevents you from being able to multitask.
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7726050–7726125, SHA-256 5844be9f5b40df61.
Jev judged not model-facing (confidence 0.14; role human). This is a classifier judgment, not proof of delivery.
Readable text: is very disruptive because it prevents you from being able to multitask.
is very disruptive because it prevents you from being able to multitask.
You'll be notified when the backgrounded command completes. Only poll with
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7726166–7726242, SHA-256 0e598a625158ad52.
Jev judged not model-facing (confidence 0.23; role human). This is a classifier judgment, not proof of delivery.
Readable text: You'll be notified when the backgrounded command completes. Only poll with
You'll be notified when the backgrounded command completes. Only poll with
when the command requires close monitoring — long-running jobs that can silently
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7726258–7726630, SHA-256 18e9fe6bed36f579.
Jev judged not model-facing (confidence 0.32; role human). This is a classifier judgment, not proof of delivery.
Readable text: when the command requires close monitoring — long-running jobs that can silently hang or degrade before completing (training runs, eval runs, deployments, long builds, datagen pipelines, DB migrations, large data transfers). For fire-and-f…
when the command requires close monitoring — long-running jobs that can silently hang or degrade before completing (training runs, eval runs, deployments, long builds, datagen pipelines, DB migrations, large data transfers). For fire-and-forget commands (tests, installs, dev servers/watchers, short scripts), start them and keep working — you can always poll with
later if you end up blocked on the result. If under your control, prefer command
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7726646–7726798, SHA-256 d6bd63ba7d15b68b.
Jev judged not model-facing (confidence 0.4; role human). This is a classifier judgment, not proof of delivery.
Readable text: later if you end up blocked on the result. If under your control, prefer commands that print periodic status updates so close monitoring is effective.
later if you end up blocked on the result. If under your control, prefer commands that print periodic status updates so close monitoring is effective.
Use the
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7726845–7726855, SHA-256 93fe22c6db4e649a.
Jev judged not model-facing (confidence 0.36; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Use the
Use the
tool to monitor the background command. If under your control, prefer commands t
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7726867–7727015, SHA-256 385a13573b512800.
Jev judged not model-facing (confidence 0.66; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: tool to monitor the background command. If under your control, prefer commands that print periodic status updates so you can monitor effectively.
tool to monitor the background command. If under your control, prefer commands that print periodic status updates so you can monitor effectively.
Scheduling notifications
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7727047–7727073, SHA-256 a12418a7bf9bb6e1.
Jev judged not model-facing (confidence 0.13; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Scheduling notifications
Scheduling notifications
You can schedule notifications for yourself by starting a background shell that
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7727119–7727443, SHA-256 7b6e8dda61e70fbd.
Jev judged not model-facing (confidence 0.33; role human). This is a classifier judgment, not proof of delivery.
Readable text: You can schedule notifications for yourself by starting a background shell that sleeps and echos a reminder message. This can be very useful for reminding yourself to check on another shell or task and verify it is making progress. Always t…
You can schedule notifications for yourself by starting a background shell that sleeps and echos a reminder message. This can be very useful for reminding yourself to check on another shell or task and verify it is making progress. Always think about how long you expect something to take before scheduling a notification.
tmux-backed shell sessions
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7727473–7727501, SHA-256 3ffd05a369baa98f.
Jev judged not model-facing (confidence 0.15; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: tmux-backed shell sessions
tmux-backed shell sessions
Other common operations
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7727704–7727729, SHA-256 abf22631961eac44.
Jev judged not model-facing (confidence 0.1; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Other common operations
Other common operations
View comments on a Github PR: gh api repos/foo/bar/pulls/123/comments
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7727775–7727846, SHA-256 1017ae852ec10730.
Jev judged not model-facing (confidence 0.33; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: View comments on a Github PR: gh api repos/foo/bar/pulls/123/comments
View comments on a Github PR: gh api repos/foo/bar/pulls/123/comments
The command to execute
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7727931–7727955, SHA-256 a31feff404100be4.
Jev judged not model-facing (confidence 0.62; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: The command to execute
The command to execute
The absolute path to the working directory to execute the command in (defaults t
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7727988–7728090, SHA-256 c54cd91c87455410.
Jev judged not model-facing (confidence 0.69; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: The absolute path to the working directory to execute the command in (defaults to current directory)
The absolute path to the working directory to execute the command in (defaults to current directory)
${e}ms / ${Number.isInteger(t)?"":" "}${r} second${1===r?"":"s"}
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7728187–7728253, SHA-256 a32f644a9ff9cad9.
Jev judged not model-facing (confidence 0.04; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${e}ms / ${Number.isInteger(t)?"":"~"}${r} second${1===r?"":"s"}
${e}ms / ${Number.isInteger(t)?"":"~"}${r} second${1===r?"":"s"}
${e}ms / ${Number.isInteger(r)?"":" "}${t} minute${1===t?"":"s"}
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7728327–7728393, SHA-256 ed6201530b5eafe8.
Jev judged not model-facing (confidence 0.04; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${e}ms / ${Number.isInteger(r)?"":"~"}${t} minute${1===t?"":"s"}
${e}ms / ${Number.isInteger(r)?"":"~"}${t} minute${1===t?"":"s"}
How long to block and wait for the command to complete before moving it to backg
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7728456–7728884, SHA-256 b3a146d02f3067fc.
Jev judged not model-facing (confidence 0.45; role parameter). This is a classifier judgment, not proof of delivery.
Readable form: a shipped code or data literal beginning “How long to block and wait for the command to complete before moving it to backg”. The exact literal is preserved below; its runtime purpose requires the surrounding source.
How long to block and wait for the command to complete before moving it to background (in milliseconds). Defaults to ${function(e){const t=e/1e3;if(Number.isInteger(t)&&t>0&&t<=120)return`${e}ms (${t} second${1===t?"":"s"})`;const r=e/6e4;return Number.isInteger(r)&&r>=1?`${e}ms (${r} minute${1===r?"":"s"})`:`${e}ms`}(e)}. Set to 0 to immediately run the command in the background. The timer includes the shell startup time.
${e}ms (${t} second${1===t?"":"s"})
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7728644–7728681, SHA-256 e713438dbfae9753.
Jev judged not model-facing (confidence 0.11; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${e}ms (${t} second${1===t?"":"s"})
${e}ms (${t} second${1===t?"":"s"})
${e}ms (${r} minute${1===r?"":"s"})
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7728729–7728766, SHA-256 8c34c6790e58cae6.
Jev judged not model-facing (confidence 0.1; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${e}ms (${r} minute${1===r?"":"s"})
${e}ms (${r} minute${1===r?"":"s"})
Clear, concise description of what this command does in 5-10 words
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7728923–7728991, SHA-256 9317a67b55b15655.
Jev judged not model-facing (confidence 0.48; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Clear, concise description of what this command does in 5-10 words
Clear, concise description of what this command does in 5-10 words
Whether the command should be run in the background
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7729024–7729077, SHA-256 c756102e63ea4c93.
Jev judged not model-facing (confidence 0.42; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Whether the command should be run in the background
Whether the command should be run in the background
Regex pattern matched against stdout/stderr output. Output redirected only to a
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7729114–7729247, SHA-256 c3c0d5a2db78edf3.
Jev judged not model-facing (confidence 0.4; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Regex pattern matched against stdout/stderr output. Output redirected only to a file will not trigger it. Do not match all outputs.
Regex pattern matched against stdout/stderr output. Output redirected only to a file will not trigger it. Do not match all outputs.
5 or less words describing why you are watching for this output. The UI (only vi
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7729273–7729409, SHA-256 9871ec9ac3bd5552.
Jev judged not model-facing (confidence 0.42; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: 5 or less words describing why you are watching for this output. The UI (only visible to user) will prefix it as 'Monitored 'reason''.
5 or less words describing why you are watching for this output. The UI (only visible to user) will prefix it as 'Monitored `reason`'.
Milliseconds that must elapse between notifications. The harness enforces a mini
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7729451–7729547, SHA-256 028d4ccce8984aa9.
Jev judged not model-facing (confidence 0.45; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Milliseconds that must elapse between notifications. The harness enforces a minimum of 5000ms.
Milliseconds that must elapse between notifications. The harness enforces a minimum of 5000ms.
Optional output notification config. Each terminal output which matches the patt
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7729571–7729733, SHA-256 666abd2eb46bcf43.
Jev judged not model-facing (confidence 0.46; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Optional output notification config. Each terminal output which matches the pattern will notify you. ONLY set this when the user explicitly requests monitoring.
Optional output notification config. Each terminal output which matches the pattern will notify you. ONLY set this when the user explicitly requests monitoring.
Hard timeout in milliseconds. The command will be killed after this time, even i
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7729820–7729960, SHA-256 c549841c180812d1.
Jev judged not model-facing (confidence 0.62; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Hard timeout in milliseconds. The command will be killed after this time, even if running in background (defaults to 600000ms/10 minutes).
Hard timeout in milliseconds. The command will be killed after this time, even if running in background (defaults to 600000ms/10 minutes).
Timeout in milliseconds (defaults to 30000ms/30s)
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7729961–7730012, SHA-256 66acad1ea0c7a6ac.
Jev judged not model-facing (confidence 0.64; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Timeout in milliseconds (defaults to 30000ms/30s)
Timeout in milliseconds (defaults to 30000ms/30s)
PROPOSE a command to run on behalf of the user. If you have this tool, note that
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7730065–7731420, SHA-256 87148312b0ff0e03.
Jev judged model-facing (confidence 0.92; role tool). This is a classifier judgment, not proof of delivery.
Readable text: PROPOSE a command to run on behalf of the user. If you have this tool, note that you DO have the ability to run commands directly on the USER's system. Note that the user may have to approve the command before it is executed. The user may r…
PROPOSE a command to run on behalf of the user.
If you have this tool, note that you DO have the ability to run commands directly on the USER's system.
Note that the user may have to approve the command before it is executed.
The user may reject it if it is not to their liking, or may modify the command before approving it. If they do change it, take those changes into account.
In using these tools, adhere to the following guidelines:
1. Based on the contents of the conversation, you will be told if you are in the same shell as a previous step or a different shell.
2. If in a new shell, you should `cd` to the appropriate directory and do necessary setup in addition to running the command. By default, the shell will initialize in the project root.
3. If in the same shell, LOOK IN CHAT HISTORY for your current working directory.
4. For ANY commands that would require user interaction, ASSUME THE USER IS NOT AVAILABLE TO INTERACT and PASS THE NON-INTERACTIVE FLAGS (e.g. --yes for npx).
5. If the command would use a pager, append ` | cat` to the command.
6. For commands that are long running/expected to run indefinitely until interruption, please run them in the background. To run jobs in the background, set `is_background` to true rather than changing the details of the command.
7. Dont include any newlines in the command.
Executes a given command in a shell session with optional timeout. Before execut
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7731424–7733618, SHA-256 ae5a0f2455270284.
Not classified: Source failed the privacy boundary.
Readable text: Executes a given command in a shell session with optional timeout. Before executing the command, please follow these steps: 1. Check for Running Processes: - Before starting dev servers or long-running processes that should not be duplic…
Executes a given command in a shell session with optional timeout.
Before executing the command, please follow these steps:
1. Check for Running Processes:
- Before starting dev servers or long-running processes that should not be duplicated, search the terminals folder to check if they are already running in existing terminals.
- You can use this information to determine which terminal, if any, matches the command you want to run, contains the output from the command you want to inspect, or has changed since you last read them.
- Since these are text files, you can read any terminal's contents simply by reading the file, search using the grep tool, etc.
2. Command Execution:
- Always quote file paths that contain spaces with double quotes (e.g., cd "path with spaces/file.txt")
- Examples of proper quoting:
- cd "/Users/name/My Documents" (correct)
- cd /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 (up to 600000ms / 10 minutes). If not specified, commands will timeout after 30000ms (30 seconds).
- It is very helpful if you write a clear, concise description of what this command does in 5-10 words.
- Avoid using search commands like `find` and `grep`. Instead prefer Grep, Glob to search. Avoid read tools like `cat`, `head`, and `tail`, and prefer Read to read files.
- If you _still_ need to run `grep`, STOP. ALWAYS USE ripgrep at `rg` first, which all users have pre-installed.
- When issuing multiple commands, use the ';' or '&&' operator to separate them. DO NOT use newlines (newlines are ok in quoted strings).
- Try to maintain your current working directory throughout the session by using absolute paths and avoiding usage of `cd`. You may use `cd` if the User explicitly requests it.<good-example>pytest /foo/bar/tests</good-example><bad-example>cd /foo/bar && pytest tests</bad-example>
You can monitor commands by configuring notify on output . You will be notified · byte 7733932
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7733932–7734266, SHA-256 0869c34077fa3fd5.
Jev judged not model-facing (confidence 0.54; role tool). This is a classifier judgment, not proof of delivery.
Readable text: You can monitor commands by configuring 'notify_on_output'. You will be notified at the end of your turn whenever stdout/stderr output matches the regex 'pattern'. Output redirected only to a file will not trigger it. Configure a 5-or-fewer…
You can monitor commands by configuring `notify_on_output`. You will be notified at the end of your turn whenever stdout/stderr output matches the regex `pattern`. Output redirected only to a file will not trigger it. Configure a 5-or-fewer-word `reason` explaining what you are watching for, and optionally configure `debounce_ms`.
Use a descriptive tmux session name for the task or command instead of a single
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7734420–7734614, SHA-256 fac8a5f5614ae7c6.
Jev judged not model-facing (confidence 0.64; role instructions). This is a classifier judgment, not proof of delivery.
Readable text: Use a descriptive tmux session name for the task or command instead of a single global shared name. Prefer short kebab-case names such as 'vite-dev-server', 'backend-tests', or 'db-migration'.
Use a descriptive tmux session name for the task or command instead of a single global shared name. Prefer short kebab-case names such as `vite-dev-server`, `backend-tests`, or `db-migration`.
There is one canonical shared tmux session for most recurring shell work — ${e}
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7734615–7735163, SHA-256 8069ff0db1dc1534.
Jev judged not model-facing (confidence 0.72; role instructions). This is a classifier judgment, not proof of delivery.
Readable form: a shipped code or data literal beginning “There is one canonical shared tmux session for most recurring shell work — ${e}”. The exact literal is preserved below; its runtime purpose requires the surrounding source.
There is one canonical shared tmux session for most recurring shell work — `${e}`. Start or reuse that session before ordinary setup work, then use it for every install, build, migration, version check, and verification command. Only create a separate descriptively-named session (short kebab-case, e.g. `vite-dev-server`, `backend-tests`, `postgres`) for long-running side processes that must keep running after a single command finishes. Do NOT invent a new per-task session name for ordinary shell work — route it through `${e}`.
tmux-backed-shell-sessions - tmux is the required mechanism for shell work tha
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7735178–7736190, SHA-256 ecb20048e6c807b5.
Jev judged model-facing (confidence 0.87; role instructions). This is a classifier judgment, not proof of delivery.
Readable text: <tmux-backed-shell-sessions> - tmux is the required mechanism for shell work that may outlive a single command. If you need an interactive shell, any background command (such as starting dev servers), a long-running process, follow-up input…
<tmux-backed-shell-sessions>
- tmux is the required mechanism for shell work that may outlive a single command. If you need an interactive shell, any background command (such as starting dev servers), a long-running process, follow-up input, later inspection, or a shared session that you or the user may reconnect to later, you MUST use tmux. Do NOT launch those workflows as one-shot background processes. If you are planning to set block_until_ms to 0, you should ALWAYS back this session with tmux.
- ${nL(t)}
- ${r}
- Start or reuse the appropriate session by running `${sL({sharedSessionName:e,selfHostedMachine:t})}`.
- Before creating a new session, list existing sessions with `${n} ls` and reuse an existing one when appropriate.
- To inspect or continue work in an existing session, attach with `${n} attach-session -t "$SESSION_NAME"`.
- To send input to a session without attaching, run `${n} send-keys -t "$SESSION_NAME:0.0" 'your command here' C-m`.
</tmux-backed-shell-sessions>
${e} ${t.join(" n n")}
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7736306–7736333, SHA-256 f0514f220838479a.
Jev judged not model-facing (confidence 0.43; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${e} ${t.join("\n\n")}
${e}
${t.join("\n\n")}
Execute shell commands in the workspace. - The shell is stateful - cwd env var
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7736354–7737511, SHA-256 8dc41be524f2b8d6.
Jev judged model-facing (confidence 0.9; role instructions). This is a classifier judgment, not proof of delivery.
Readable text: Execute shell commands in the workspace. - The shell is stateful - cwd & env vars persist for subsequent calls. - Make efficient use of shell calls and minimize wasted tokens. - Batch related shell work together or run independent checks i…
Execute shell commands in the workspace.
- The shell is stateful - cwd & env vars persist for subsequent calls.
- Make efficient use of shell calls and minimize wasted tokens.
- Batch related shell work together or run independent checks in parallel when safe. Make liberal use of `&&`, `;`, pipes, greps and other efficient shell use.
- Use targeted, output-limited terminal commands such as `rg`, `head`, `tail`, `sed -n`, when relevant to limit output.
- NEVER use `set -x`; it breaks this tool. If it gets set, run `set +x` to fix the shell.
- Optimize for overall cost, including cache reads, cache writes, and output tokens.
- Use the 'Workspace Path' field in the `<user_info>` section to resolve the workspace path. It will likely NOT be at `/workspace`; don't waste time trying that.
- Still do whatever validation is necessary to ensure the judgment is correct; efficiency means avoiding waste, not skipping verification.
- This may still be a long-running investigation if correctness requires it, but do not spend tokens on status updates, progress narration, or UX niceties while judging.
- Always quote paths that contain spaces.
${e} ${t.join(" n n")} · byte 7737564
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7737564–7737591, SHA-256 f0514f220838479a.
Jev judged not model-facing (confidence 0.43; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${e} ${t.join("\n\n")}
${e}
${t.join("\n\n")}
Executes a given command in a shell session, waiting for output for block until
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7737622–7737716, SHA-256 34a3907f2ec797fa.
Jev judged not model-facing (confidence 0.71; role tool). This is a classifier judgment, not proof of delivery.
Readable text: Executes a given command in a shell session, waiting for output for 'block_until_ms' millis.
Executes a given command in a shell session, waiting for output for `block_until_ms` millis.
${t} ${f}
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7737732–7737746, SHA-256 d164e7109a76771f.
Jev judged not model-facing (confidence 0.28; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${t} ${f}
${t}
${f}
${r} ${g}
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7737767–7737779, SHA-256 9660e5ee7f37b2b1.
Jev judged not model-facing (confidence 0.27; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${r} ${g}
${r}
${g}
- You'll be notified when the backgrounded command completes. Only poll with ${
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7737863–7738373, SHA-256 b3b13248b78f413a.
Jev judged model-facing (confidence 0.85; role instructions). This is a classifier judgment, not proof of delivery.
Readable text: - You'll be notified when the backgrounded command completes. Only poll with '${a}' when the command requires close monitoring — long-running jobs that can silently hang or degrade before completing (training runs, eval runs, deployments, …
- You'll be notified when the backgrounded command completes. Only poll with `${a}` when the command requires close monitoring — long-running jobs that can silently hang or degrade before completing (training runs, eval runs, deployments, long builds, datagen pipelines, DB migrations, large data transfers). For fire-and-forget commands (tests, installs, dev servers/watchers, short scripts), start them and keep working — you can always poll with `${a}` later if you end up blocked on the result.
- Use ${a} to monitor the background command.
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7738374–7738427, SHA-256 4b6dde0565230c1d.
Jev judged not model-facing (confidence 0.75; role instructions). This is a classifier judgment, not proof of delivery.
Readable text: - Use '${a}' to monitor the background command.
- Use `${a}` to monitor the background command.
- Monitoring backgrounded commands: - When command moves to background, check st
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7738428–7739606, SHA-256 906badd2b90f1ebb.
Jev judged model-facing (confidence 0.85; role instructions). This is a classifier judgment, not proof of delivery.
Readable text: - Monitoring backgrounded commands: - When command moves to background, check status immediately by reading the terminal file. - Header has 'pid' and 'running_for_ms' (updated every 5000ms) - When finished, footer with 'exit_code' an…
- Monitoring backgrounded commands:
- When command moves to background, check status immediately by reading the terminal file.
- Header has `pid` and `running_for_ms` (updated every 5000ms)
- When finished, footer with `exit_code` and `elapsed_ms` appears.
- Poll repeatedly to monitor by sleeping between checks. If the file gets large, read from the end of the file to capture the latest content.
- Pick your sleep intervals using best guess/judgment based on any knowledge you have about the command and its expected runtime, and any output from monitoring the command. When no new output, exponential backoff is a good strategy (e.g. sleep 2000ms, 4000ms, 8000ms, 16000ms...), using educated guess for min and max wait.
- If it's longer than expected and the command seems like it is hung, kill the process if safe to do so using the pid that appears in the header. If possible, try to fix the hang and proceed.
- Don't stop polling until: (a) `exit_code` footer appears (terminating command), (b) the command reaches a healthy steady state (only for non-terminating command, e.g. dev server/watcher), or (c) command is hung - follow guidance above.
Executes a given command in a shell session with optional foreground timeout. Be
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7739616–7742657, SHA-256 5d514b525242010f.
Not classified: Source failed the privacy boundary.
Readable text: Executes a given command in a shell session with optional foreground timeout. Before executing the command, please follow these steps: 1. Check for Running Processes: - Before starting dev servers or long-running processes that should no…
Executes a given command in a shell session with optional foreground timeout.
Before executing the command, please follow these steps:
1. Check for Running Processes:
- Before starting dev servers or long-running processes that should not be duplicated, search the terminals folder to check if they are already running in existing terminals.
- You can use this information to determine which terminal, if any, matches the command you want to run, contains the output from the command you want to inspect, or has changed since you last read them.
- Since these are text files, you can read any terminal's contents simply by reading the file, search using the grep tool, etc.
2. Command Execution:
- Always quote file paths that contain spaces with double quotes (e.g., cd "path with spaces/file.txt")
- Examples of proper quoting:
- cd "/Users/name/My Documents" (correct)
- cd /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.
- The shell starts in the workspace root and is stateful across sequential calls. Current working directory and environment variables persist between calls. Use the `working_directory` parameter to run commands in different directories.
- It is very helpful if you write a clear, concise description of what this command does in 5-10 words.
- Avoid using search commands like `find` and `grep`. Instead prefer Grep, Glob to search. Avoid read tools like `cat`, `head`, and `tail`, and prefer Read to read files. Avoid editing files with tools like `sed` and `awk`, use Edit instead.
- If you _still_ need to run `grep`, STOP. ALWAYS USE ripgrep at `rg` first, which all users have pre-installed.
- When issuing multiple commands, use the ';' or '&&' operator to separate them. DO NOT use newlines (newlines are ok in quoted strings).
- Try to maintain your current working directory throughout the session by using absolute paths and avoiding usage of `cd`. You may use `cd` if the User explicitly requests it.
${`Managing long-running commands:\n- Commands that don't complete within \`block_until_ms\`${d?"":` (default ${function(e){const t=e/1e3;if(Number.isInteger(t))return`${t}s`;return`${e}ms`}(p??3e4)})`} are moved to background. The command keeps running and output streams to a terminal file. Set \`block_until_ms: 0\` to immediately background (use for dev servers, watchers, or any long-running process).\n- You do not need to use '&' at the end of commands.\n- Make sure to set \`block_until_ms\` to higher than the command's expected runtime. Add some buffer since block_until_ms includes shell startup time; increase buffer next time based on \`elapsed_ms\` if you chose too low. E.g. if you sleep for 40s, recommended \`block_until_ms\` is 45s.\n${t}${e}`}
Managing long-running commands: - Commands that don't complete within block unt
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7741896–7742655, SHA-256 ad152b959dc1ebce.
Jev judged not model-facing (confidence 0.69; role documentation). This is a classifier judgment, not proof of delivery.
Readable text: Managing long-running commands: - Commands that don't complete within 'block_until_ms'${d?"":' (default ${function(e){const t=e/1e3;if(Number.isInteger(t))return'${t}s';return'${e}ms'}(p??3e4)})'} are moved to background. The command keeps …
Managing long-running commands:
- Commands that don't complete within `block_until_ms`${d?"":` (default ${function(e){const t=e/1e3;if(Number.isInteger(t))return`${t}s`;return`${e}ms`}(p??3e4)})`} are moved to background. The command keeps running and output streams to a terminal file. Set `block_until_ms: 0` to immediately background (use for dev servers, watchers, or any long-running process).
- You do not need to use '&' at the end of commands.
- Make sure to set `block_until_ms` to higher than the command's expected runtime. Add some buffer since block_until_ms includes shell startup time; increase buffer next time based on `elapsed_ms` if you chose too low. E.g. if you sleep for 40s, recommended `block_until_ms` is 45s.
${t}${e}
(default ${function(e){const t=e/1e3;if(Number.isInteger(t))return ${t}s ;return
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7741993–7742095, SHA-256 1348801d1d4ce63d.
Jev judged not model-facing (confidence 0.21; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: (default ${function(e){const t=e/1e3;if(Number.isInteger(t))return'${t}s';return'${e}ms'}(p??3e4)})
(default ${function(e){const t=e/1e3;if(Number.isInteger(t))return`${t}s`;return`${e}ms`}(p??3e4)})
${SL} - ${f}
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7742682–7742697, SHA-256 0035d97364ad1007.
Jev judged not model-facing (confidence 0.29; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${SL} - ${f}
${SL}
- ${f}
The terminal command to execute
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7742753–7742786, SHA-256 0c6ffe0cfe769509.
Jev judged not model-facing (confidence 0.67; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: The terminal command to execute
The terminal command to execute
Whether the command should be run in the background · byte 7742819
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7742819–7742872, SHA-256 c756102e63ea4c93.
Jev judged not model-facing (confidence 0.62; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Whether the command should be run in the background
Whether the command should be run in the background
One sentence explanation as to why this command needs to be run and how it contr
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7742914–7743015, SHA-256 83bcf1737635e768.
Jev judged not model-facing (confidence 0.76; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: One sentence explanation as to why this command needs to be run and how it contributes to the goal.
One sentence explanation as to why this command needs to be run and how it contributes to the goal.
The command to execute · byte 7743054
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7743054–7743078, SHA-256 a31feff404100be4.
Jev judged not model-facing (confidence 0.65; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: The command to execute
The command to execute
The absolute path to the working directory to execute the command in (defaults t · byte 7743126
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7743126–7743228, SHA-256 c54cd91c87455410.
Jev judged model-facing (confidence 0.81; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: The absolute path to the working directory to execute the command in (defaults to current directory)
The absolute path to the working directory to execute the command in (defaults to current directory)
Timeout in milliseconds (defaults to 30000ms/30s) · byte 7743263
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7743263–7743314, SHA-256 66acad1ea0c7a6ac.
Jev judged not model-facing (confidence 0.73; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Timeout in milliseconds (defaults to 30000ms/30s)
Timeout in milliseconds (defaults to 30000ms/30s)
Clear, concise description of what this command does in 5-10 words. Examples: In
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7743356–7743658, SHA-256 439a508d6f8fa202.
Jev judged not model-facing (confidence 0.72; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Clear, concise description of what this command does in 5-10 words. Examples: Input: ls Output: Lists files in current directory Input: git status Output: Shows working tree status Input: npm install Output: Installs package dependencies …
Clear, concise description of what this command does in 5-10 words. Examples:
Input: ls
Output: Lists files in current directory
Input: git status
Output: Shows working tree status
Input: npm install
Output: Installs package dependencies
Input: mkdir foo
Output: Creates directory 'foo'
Whether the command should be run in the background · byte 7743702
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7743702–7743755, SHA-256 c756102e63ea4c93.
Jev judged not model-facing (confidence 0.6; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Whether the command should be run in the background
Whether the command should be run in the background
How long to block and wait for the command to complete before moving it to backg · byte 7743780
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7743780–7744208, SHA-256 b3a146d02f3067fc.
Jev judged not model-facing (confidence 0.36; role parameter). This is a classifier judgment, not proof of delivery.
Readable form: a shipped code or data literal beginning “How long to block and wait for the command to complete before moving it to backg · byte 7743780”. The exact literal is preserved below; its runtime purpose requires the surrounding source.
How long to block and wait for the command to complete before moving it to background (in milliseconds). Defaults to ${function(e){const t=e/1e3;if(Number.isInteger(t)&&t>0&&t<=120)return`${e}ms (${t} second${1===t?"":"s"})`;const r=e/6e4;return Number.isInteger(r)&&r>=1?`${e}ms (${r} minute${1===r?"":"s"})`:`${e}ms`}(e)}. Set to 0 to immediately run the command in the background. The timer includes the shell startup time.
${e}ms (${t} second${1===t?"":"s"}) · byte 7743968
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7743968–7744005, SHA-256 e713438dbfae9753.
Jev judged not model-facing (confidence 0.06; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${e}ms (${t} second${1===t?"":"s"})
${e}ms (${t} second${1===t?"":"s"})
${e}ms (${r} minute${1===r?"":"s"}) · byte 7744053
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-agent-host/dist/main.js, bytes 7744053–7744090, SHA-256 8c34c6790e58cae6.
Jev judged not model-facing (confidence 0.09; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: ${e}ms (${r} minute${1===r?"":"s"})
${e}ms (${r} minute${1===r?"":"s"})