Forward reset=true from code_execution_remote replacement commands to the connected CLI and document when to use it versus runtime=reset. This lets the CLI tear down stuck host sessions before running the next command. Tests from /home/eclypso/a0/a0-connector: PYTHONPATH=src conda run -n a0 pytest tests/test_plugin_backend.py::test_code_execution_remote_forwards_reset_true_with_replacement_command -v; ./.venv/bin/python -m pytest tests/test_plugin_backend.py -k 'code_execution_remote or select_remote_exec or ws_connector_exec_result' -v. Mirrored to live container 07e0288dc04f and health check returned HTTP 200.
2.4 KiB
code_execution_remote tool
Runs shell-backed execution on the machine where a connected A0 CLI is running.
Use this tool, not code_execution_tool, when the user asks for the connected
local terminal, the A0 CLI host, their local machine, or explicitly says not to
use Docker/server/container execution.
For complex local project work, optionally load skill host-code-execution.
Availability and permissions are checked when the tool runs. If no CLI is connected, remote execution is disabled, or local access is not Read&Write for a mutating command, report that to the user instead of falling back to server-side execution.
Do not use this tool as a fallback for host-browser navigation/control. For
"my browser", host browser, local browser/Chrome, or opening a URL in the host
browser, use the browser tool. If Browser reports missing Chrome
remote-debugging consent, tell the user to open chrome://inspect/#remote-debugging,
enable "Allow remote debugging for this browser instance", run /browser host on,
and retry.
Arguments
runtime: one ofterminal,python,nodejs,output,resetsession: integer session id (default0)reset: optional boolean forterminal,python, ornodejs; when true, the CLI resets the session before running the supplied code
Runtime-specific fields:
terminal,python,nodejs: requirecodereset: optionalreason
Notes
- Reuse
sessionwhen continuing a workflow. - Use
outputto poll a running session andruntime=resetfor a stuck session. Usereset: trueon a new command when you need a clean session and want to run the replacement command immediately. - Paths and shell syntax are evaluated on the CLI host, not inside Agent Zero.
- When the user gives a relative path like
tmp/file.txt, keep it relative to the CLI host terminal. Do not prepend orcdto/a0/usr/workdir; that is the Agent Zero server/Docker workdir, not the connected local terminal folder. - If the current terminal folder matters, run
pwdfirst or includepwdin the same command without changing directories.
Usage
{
"thoughts": [
"The user asked for the connected local terminal rather than Docker, so I should execute on the A0 CLI host."
],
"headline": "Running command on connected local terminal",
"tool_name": "code_execution_remote",
"tool_args": {
"runtime": "terminal",
"session": 0,
"code": "pwd"
}
}