ChatGPT can read your Terminal. Here is how to let it run commands, and what to limit
OpenAI's help page for Work with Apps on macOS describes ChatGPT reading the last 200 lines of your open Terminal panes. It does not describe running commands. To let ChatGPT run them, connect it to your Mac over MCP with CMDOP and switch running on by hand for that agent. Tasks run in a real terminal, and you can stop each one by its id.
Guides · Facts read
Read or run
| Work with Apps on macOS | CMDOP over MCP | |
|---|---|---|
| What ChatGPT gets | The last 200 lines of open Terminal panes, as context | Tools on the computer: files, commands, long tasks |
| Running a command | Not described on OpenAI's help page | Possible once you switch it on for that agent |
| Who decides | OpenAI's page does not say | You, per agent, on your page |
Check the help page again before you rely on this table: it is OpenAI's to change, and it was read on the date above.
Connect ChatGPT first
Install CMDOP on the Mac and add your address in ChatGPT. The steps are in the guide on using ChatGPT with your own computer.
Switch running on
A new agent can only read. Running commands is switched on by hand, for that agent, on your page. The computer keeps its own limit as well, set on the computer itself.
Run a first task
- Ask ChatGPT to run
git statusin a project folder and tell you the result. It waits for the command and reports its exit code. - Ask it to start a long one, such as a build, as a task. A task runs in a real terminal and returns an id at once.
- Ask it to read the task's output. It reads the terminal as a screen, whether the task is still running or has ended.
- Ask it to stop the task by its id.
What happens when you close the chat
A long task keeps running after the chat closes. It ends when you pause the computer, when it is stopped, or when the CMDOP program on the computer restarts, which includes an update. The computer keeps the output of its last 50 tasks until a restart, then lists them as lost.
What to limit
- Treat running as the widest switch. The file tools refuse folders that hold keys, such as
~/.sshand~/.kube, unless the computer's own limit opens them. An agent that can run commands is not held to folders. - Switch running on for the agents and computers where you would accept that.
- To stop every call and every task on a computer at once, pause it from your page. Only a person at the computer can resume it.
- Revoking an agent cuts it off from its next call. Use pause when work is already running.
Limits of this page
- macOS and Linux only. Windows is not supported yet.
- This page does not say which ChatGPT plans can add an MCP server.
- The comparison with Work with Apps reflects one help page on one day.