Shell mode (!)
Sometimes you just want to run a command yourself: check git status, start a dev server, look at a log. Start the line with ! and Syntic Code runs it in your shell instead of sending it to the agent.
! git log --oneline -5
! npm run lint
! ls src/componentsAs soon as you type !, the prompt box shows that you are in shell mode. The output appears in the transcript.
How it behaves
- No permission prompt. You typed the command, so it runs right away. Permission rules only apply to commands the agent runs.
- Your shell, your folder. It runs in the session’s working folder with the same shell the agent uses (your login shell unless you set
shellin settings). - One at a time. While a
!command is still running, a new one is not started; you are told to wait for the first to finish. - Background it. Press
Ctrl+Bto move a long-running command (a dev server, a watcher) to the background and keep chatting. It then shows in the agents view (/tasks).
Typing helpers
| Key | Does |
|---|---|
Tab | Completes the file path you are typing. |
↑ on a ! line | Steps back through earlier ! commands only, not your normal prompts. |
→ | Takes the grey suggestion from your recent shell commands. |
The agent sees what you ran
The command and its output are added to the conversation, so the agent knows about them from your next message on. Run ! npm test, then just say “fix that failure”: no copying and pasting.
By default the agent does not answer a ! command by itself; it waits for your next message. To have it react straight away, set "respondToBashCommands": true in your settings.
Shell mode or a slash command?
| You want to | Use |
|---|---|
| Run a quick command and read its output | !command |
| Set an environment variable for every command this session runs | /env NAME=value |
| Have the agent run commands as part of a task | Just ask, for example “run the tests and fix what fails” |
| Turn on the sandbox for the agent’s commands | /sandbox on (Shell sandbox) |