AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How Agent Mode in Warp Plans and Executes Multi-Step Terminal Tasks with Human Approval

Amanda Nagy · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Terminal automation has spent years caught between two bad extremes: brittle bash scripts that fail at the first unexpected error, and completely unsupervised AI agents that treat root privileges like a playground toy.

Warp takes a fundamentally different route with Agent Mode. Instead of asking you to trust an autonomous background process or forcing you into manual copy-pasting from a browser chat window, Warp embeds an interactive LLM runtime directly into the terminal canvas. It breaks complex terminal jobs into clear, reviewable plans, presents each command or file change as a distinct checkpoint, and waits for your confirmation before touching the machine.

At 365Finds, we look at developer tools through a lens of operational sanity. Letting an AI model run arbitrary commands in your shell is terrifying if you cannot inspect its logic. Warp's human-in-the-loop architecture provides an operable middle ground: the AI does the cognitive heavy lifting of planning and syntax generation, while you retain the ultimate veto over execution.


1. The Planning Stage: Spec-Driven Task Breakdown

When you hand Warp a multi-step objective—such as diagnosing a crashing Docker container, refactoring a database migration, or setting up a local Kubernetes cluster—it does not immediately execute commands. Instead, it enters a structured planning stage.

Invoking /plan and Gathering Grounding Context

You trigger planning either through natural conversation in Agent Mode or explicitly via the /plan command. At this point, the agent analyzes the prompt alongside local context:

User prompt: /plan Migrate local PostgreSQL database to v16 and verify schema integrity
Agent: Explores environment -> inspects pg_dump version -> builds multi-step plan

The Interactive Plan Blueprint

Rather than emitting a monolithic wall of text, Warp renders an editable, step-by-step specification. Each step specifies its intended action—such as checking current database versions, dumping tables, updating Docker compose files, and verifying network ports.

You can edit this plan before execution starts. If the agent misinterprets your deployment strategy or suggests an unnecessary backup step, you can delete, reorder, or amend the plan text directly. Warp syncs these specifications to Warp Drive, allowing teams to version them, attach them to pull requests, or reference them in subsequent sessions.


2. The Step-by-Step Execution Loop

Once you approve the initial blueprint, Warp transitions from passive planning to active terminal execution. The execution cycle operates as a closed-loop state machine governed by human checkpoints.

flowchart TD
    A["Agent Analyzes Next Plan Step"] --> B["Propose Action (Shell Command / File Edit / MCP)"]
    B --> C{"Check Profile Permissions & Denylist"}
    C -- "Blocked / Requires Confirmation" --> D["Render Permission Card to User"]
    C -- "Always Allow & Not in Denylist" --> E["Execute Directly in Terminal"]
    D --> F{"User Action"}
    F -- "Approve (Enter)" --> E
    F -- "Edit ('E')" --> G["User Tweaks Command Inline"] --> E
    F -- "Guide ('Other')" --> H["Agent Adjusts Approach"] --> A
    F -- "Reject" --> I["Abort Step / Stop Session"]
    E --> J["Read stdout, stderr, and Exit Code"]
    J --> K{"Success or Error?"}
    K -- "Error Detected" --> L["Agent Formulates Diagnostic Step"] --> B
    K -- "Success" --> M{"More Steps in Plan?"}
    M -- "Yes" --> A
    M -- "No" --> N["Complete Task Run"]

The Permission Card Checkpoint

Before any proposed action touches your system, Warp evaluates it against your active execution profile. If confirmation is required, the agent pauses and renders a dedicated Permission Card within the conversation view.

This card isolates the exact operation:

Code and File Diff Inspection

When an agent task requires creating or modifying code files, Warp does not silently overwrite files on disk. Instead, the permission card presents an interactive diff view. Pressing E on a file-edits card expands side-by-side or unified diffs, allowing you to review line deletions and insertions before changes land in your working tree.

Adaptive Error Recovery

When a step executes, Warp captures the actual terminal stream—standard output, error messages, and process return codes. If a command fails (for example, a port conflict or a missing dependency), the agent inspects the error trace in real time, formulates a remedial hypothesis, adjusts the remaining steps in the plan, and presents the corrected diagnostic command for your approval.


3. Configuring Autonomy: Profiles and the Command Denylist

Running multi-step terminal tasks with manual confirmation at every single step can become tedious. A twenty-command deployment pipeline quickly triggers click fatigue. Warp addresses this tension through granular autonomy controls.

Granular Autonomy States

Under Settings > Agents > Profiles, you can create specialized profiles tailored to specific environments (such as a cautious "Production Audit" profile versus a rapid "Local Scratchpad" profile). Each action type can be set to one of three autonomy levels:

Action Categoryalways_askagent_decidesalways_allow
Shell CommandsPrompts on every commandAgent evaluates risk before promptingExecutes automatically without prompts
File ReadsPrompts before reading any fileAgent reads workspace files autonomouslyReads all files within scope automatically
File EditsPrompts with code diff reviewPrompts with code diff reviewApplies changes immediately
MCP Tool CallsPrompts on each tool invocationAgent decides based on tool metadataExecutes tools autonomously

The Unbreakable Guardrail: Command Denylist

The single most critical safety mechanism in Warp is the Command Denylist. It acts as an absolute override that sits above all permission states.

Even if you configure a profile to always_allow or activate full-autonomy mode, any command matching your configured denylist will forcibly pause the agent and demand explicit human approval.

At 365Finds, we strongly recommend hardcoding high-risk operational binaries and flags into this list:

For organizational workspaces, Team Admins can lock down these denylists and permission floors from the centralized Admin panel, ensuring that junior developers cannot accidentally bypass safety guardrails on enterprise machines.


4. How to Run a Multi-Step Task: A Practical Walkthrough

To see how this architecture functions in practice, consider a routine operational problem: discovering what process is locking port 8080, terminating it, and cleanly restarting a Node.js development server.

# Step 1: Open Agent Mode and provide the intent
Warp Agent Prompt: "Port 8080 is blocked. Find the process, kill it safely, and restart npm run dev."

# Step 2: Agent evaluates environment and proposes initial inspection
Card 1: Shell Command
lsof -i :8080 -sTCP:LISTEN -t
[Approve] [Edit (E)] [Other] [Reject]
-> User approves. Output returns PID: 49201

# Step 3: Agent proposes targeted termination
Card 2: Shell Command
kill -15 49201
[Approve] [Edit (E)] [Other] [Reject]
-> User inspects PID, confirms process identity, and approves.

# Step 4: Agent verifies port release
Card 3: Shell Command
lsof -i :8080
-> Output: empty (Port cleared)

# Step 5: Agent restarts the server
Card 4: Shell Command
npm run dev
[Approve] [Edit (E)] [Other] [Reject]
-> User approves. Dev server starts successfully.

At every stage, the agent managed the commands, captured outputs, and chained subsequent logic, but zero destructive or state-altering actions occurred without explicit human confirmation.


5. 365Finds Assessment: Where Warp Fits

We have spent significant time testing CLI AI assistants. Pure chat windows require annoying context-switching and introduce copy-paste errors. Fully autonomous agent frameworks, on the other hand, frequently go off the rails, hallucinating directory paths or entering endless troubleshooting loops that corrupt system states.

365Finds recommends Warp's Agent Mode specifically because of how it balances velocity and oversight:

  1. The /plan checkpoint eliminates prompt drift. Seeing an editable plan before commands fire prevents misunderstandings early.
  2. The E key shortcut transforms review from binary rejection into active collaboration. You do not have to reject a command and re-prompt if a single flag is wrong; you simply edit it in place.
  3. The Denylist prevents permission fatigue from turning into a disaster. You can safely grant autonomy to read-only commands (cat, grep, git status) while knowing irreversible commands will always stop for a human hand.

Warp's Agent Mode is not about removing the engineer from the loop; it is about freeing the engineer from typing syntax while keeping their hands firmly on the wheel.

References