Add “Explain” to shell command approval (Run once / Allow / Skip)

When the agent proposes a terminal command, I only get actions like Run once, Allow always, and Skip. That’s fast when I already trust the command—but often I don’t, especially when the suggestion is a chain (&&, |, subshells) or uses tools I don’t use every day (rg, jq, gh, PowerShell flags, etc.).

Right now I have to stop the flow, look up each part elsewhere, and guess whether the full pipeline matches what I intended. I’d like a built-in way to understand the command before I approve it.

Requested behavior

Add an Explain (or Explain command) option next to the existing approval controls. Selecting it would show a clear, structured breakdown of the exact command string being proposed—for example:

  1. What runs — each program in the chain (e.g. git, npm, bash, powershell)

  2. Arguments — what each flag, path, and token does in this invocation

  3. Order of operations — for chained/piped commands, which step runs when and what it passes to the next

  4. Intent — brief note tying the command to the agent’s current task (why it’s suggesting this)

  5. Expected outcome — what success looks like vs. common failure modes (wrong directory, missing tool, destructive flags)

Why this matters

  • Safety — I can verify the command does what I expect before anything runs on my machine.

  • Learning — I pick up unfamiliar CLI tools in context instead of tabbing out to docs every time.

  • Trust — I’m more likely to use agent-driven terminal work when I’m not approving opaque one-liners.

Nice-to-have

  • Remember “always explain for this session”

  • Highlight risky patterns (recursive delete, force push, broad chmod, etc.) in the explanation view

Workaround today

I can ask in chat (“explain this command”), but that’s separate from the approval UI and easy to miss when I’m focused on Run once vs Skip.

Hey, thanks for the detailed feature request. The case with chained commands (&&, |, subshells) and less common tools is exactly where the approval UI doesn’t really help you make a call.

Right now the approval card only shows why it paused via the smart mode classifier, not what the command actually does, so your suggestion makes sense and fits on top of the existing UI. I can’t share a timeline or make promises on implementation since it depends on demand and prioritization.

As a temporary workaround, you can keep a separate chat open and paste the command there for a quick breakdown, or in Plan Mode ask the agent to explain what it’s going to run in the terminal before it reaches approval.

If other users hit the same issue, please like the thread, it helps with prioritization.