ZIm/crates/assistant_tools/src/terminal_tool/description.md
Agus Zubiaga 2508e491d5
agent: Discourage long-running commands (#29627)
Adds popular examples of long-running commands to system prompt. 

Unfortunately, I couldn't add an eval example as the new terminal tool
no longer works in `eval`. We can look into that tomorrow, but I'm
seeing improvements when manually testing this, so I'd like to merge it.

<img
src="https://github.com/user-attachments/assets/ac24e617-e068-466f-875d-c30e1f2465c4"
width=400></img>


Release Notes:

- agent: Discourage long-running commands
2025-04-29 19:21:16 -03:00

11 lines
835 B
Markdown

Executes a shell one-liner and returns the combined output.
This tool spawns a process using the user's shell, reads from stdout and stderr (preserving the order of writes), and returns a string with the combined output result.
The output results will be shown to the user already, only list it again if necessary, avoid being redundant.
Make sure you use the `cd` parameter to navigate to one of the root directories of the project. NEVER do it as part of the `command` itself, otherwise it will error.
Do not use this tool for commands that run indefinitely, such as servers (like `npm run start`, `npm run dev`, `python -m http.server`, etc) or file watchers that don't terminate on their own.
Remember that each invocation of this tool will spawn a new shell process, so you can't rely on any state from previous invocations.