Shell or agent
How Mel decides whether a line goes to your shell or to the agent, and how to override it.
Mel has one place to type, and what you type can go to your shell or to the agent. In the terminal, Enter runs a command and Ctrl+Enter (⌘↵ on a Mac) asks the agent. Inside an agent conversation, Mel looks at each line and decides: a shell command runs as a command, anything else goes to the agent.
In the terminal
- Enter runs the line in your shell.
- Ctrl+Enter (⌘↵ on a Mac) starts an agent conversation, and what you typed becomes its first message. See Entering and exiting.
/melfrom the slash menu opens a conversation on its landing view.
New tabs and splits already open in the agent by default, and Esc drops to the terminal. To start new sessions in the shell instead, turn off Open new sessions in the Mel agent in Settings ▸ Features.
In a conversation
When you press Enter in a conversation, Mel decides where the line goes:
| You type | Where it goes | |
|---|---|---|
A line starting with ! (!npm test) | Always the shell | |
A line ending with ? | Always the agent | |
One word that is a program on your computer (ls, htop) | The shell | |
One word that's a reply (yes, no, ok, continue, stop, next, done…) | The agent, even when a program has that name | |
| Mostly plain English words | The agent | |
| A program followed by shell syntax (` | , &&, >, $(, ./, --…), or a short command (git status`) | The shell |
| Anything else | The agent |
A line with an image attached, or a saved prompt (/name), always goes to the agent.
A command that Mel runs this way shows autodetected shell command and runs inside the conversation, so the agent can see its output.
Override it
- Ctrl+I (⌃I on a Mac) flips the decision for the line you're typing: a line headed for the shell goes to the agent, and the other way round.
!at the start runs the line in the shell (while Autodetect terminal commands in agent input is on).- Turn detection off with Autodetect terminal commands in agent input in Settings ▸ AI. Then every line you type in a conversation goes to the agent; Ctrl+I still sends one line to the shell.
Asking for several agents
If a message asks for several agents at once ("use multiple agents", "investigate this in parallel"), the conversation becomes an orchestrated run and says so. Starting workers still shows a confirmation card first.
Limitations
- Detection is a quick check of the words, not a model call. A short line can go the wrong way; use Ctrl+I or
!when it does. - In the VS Code extension, everything you type goes to the agent: VS Code has its own terminal.
FAQ
I typed "yes" and nothing ran. Why? Replies like yes, no and ok go to the agent on their own, because they're answers far more often than commands. Type !yes to run the program.