The AI Command Loop

AI Workflow · free

AITerm's core AI flow is propose → approve → run. The AI never silently runs a command it generated. It writes an editable command into the input bar and waits for you. Nothing reaches the shell until you approve the exact text in the bar.

This is the single most important thing to understand about the default AI command loop: the AI drafts for your command line; you still approve the exact command before it runs. The optional agent modes are a separate, explicit opt-in — see The Autonomous Agent.

Step by step

  1. You type a plain-English request in the input bar.
  2. AITerm asks your selected provider for a shell command.
  3. The proposed command appears in the input bar, selected and editable.
  4. AITerm evaluates it and shows a risk badge when it's useful.
  5. You edit it if you want to.
  6. Press Return to approve exactly what's in the bar. Press Escape to discard it.
  7. AITerm re-checks that exact command through the security gate, then runs it.

"Approve" always means "run the exact command currently shown in the bar." If you edit the proposal, the edited version is what gets evaluated and run — the AI's original suggestion has no special standing.

A worked example

Type:

show the 10 biggest files under this folder

AITerm might propose:

du -ah . | sort -rh | head -n 10

with a Safe badge. Read it, tweak the 10 if you like, and press Return. If instead you'd asked to "delete all the .log files," the proposal would carry a Destructive badge, and depending on your Safety Profile you'd get a confirmation before it could run.

Risk badges

Every proposal is tiered so you can judge it at a glance:

Click the badge to open the risk popover. It explains the reason in plain language, can offer a safer alternative when one exists, and for eligible destructive commands can offer a dry-run preview, a rollback hint, or a back up, then run action. See Safety and Security.

One execution chokepoint

There is exactly one path to the shell: a command must pass the security gate before it runs. This is true whether the command came from the AI, from a slash command, from a runbook, or from an agent step.

Typing directly instead

You don't have to use the AI at all. Click inside the terminal pane and type on the shell line like any terminal — in that mode the status shows the AI gate is off, and you're driving the raw shell. See Terminal Basics for how direct typing and the AI bar hand off to each other.

Related pages: Terminal Basics, Safety and Security, Slash Commands Reference, Privacy and Data Handling.