Run Command in Background
run_command_backgroundExecute a long-running command in the background and obtain its process ID for managing the process later. Requires user approval.
Instructions
Start a long-running command in the background and return immediately with its process ID. ALWAYS requires interactive user approval before running.
Args:
command (string): The command to execute.
cwd (string, optional): Working directory. Defaults to the first allowed directory.
Returns: the process ID (pid), which can be used with list_processes and kill_process.
Note: background processes have no timeout, but they are tracked and can be killed with kill_process. They do not survive this server process restarting (e.g. Claude Desktop being closed and reopened).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the command | |
| command | Yes | Shell command to execute in the background |