> ## Documentation Index
> Fetch the complete documentation index at: https://panopticon-cli.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Commands

> Commands for managing autonomous AI agents

export const ThemedImage = ({light, dark, alt = ""}) => <>
    <img src={light} alt={alt} className="block dark:hidden" />
    <img src={dark ?? light} alt={alt} className="hidden dark:block" />
  </>;

# Agent Commands

Spawn, monitor, and control autonomous AI coding agents.

## pan work issue

Spawn an agent for a Linear or GitHub issue.

```bash theme={null}
# Spawn an agent for a Linear issue
pan work issue MIN-123

# Spawn an agent for a GitHub issue
pan work issue 42
```

This command:

1. Creates a workspace (git worktree) if it doesn't exist
2. Spawns an autonomous agent in a tmux session
3. The agent reads the issue, explores the codebase, and implements the solution

## pan work status

List all running agents and their status.

```bash theme={null}
pan work status
```

Shows:

* Agent session ID
* Issue number and title
* Current status
* Runtime duration
* Workspace location

The dashboard's **Agents** page is the visual counterpart to this command. A metric strip across the top tallies how many agents are running, how many are stuck, and the rolling cost and token spend over the last 24 hours, with each agent rendered as a card showing its model, runtime, and last activity.

<ThemedImage light="/images/dashboard/agents-light.png" dark="/images/dashboard/agents-dark.png" alt="Agents page: a metric strip for Running, Stuck, Cost 24h, Tokens 24h, runtime, and Queue over agent cards showing each agent's model, runtime, and last activity" />

<Tip>
  Use `pan work status` from the terminal for a quick check, and the Agents page when you want to watch many agents at once and spot stuck ones at a glance.
</Tip>

## pan work tell

Send a message to a running agent.

```bash theme={null}
# Send a message to an agent (handles Enter key automatically)
pan work tell min-123 "Please also add tests"
```

This command:

* Sends your message to the agent's tmux session
* The agent receives it and responds accordingly
* Useful for providing feedback, clarification, or guidance

## pan work kill

Stop a running agent.

```bash theme={null}
pan work kill min-123
```

Terminates the agent's tmux session. The workspace and any uncommitted work remain intact.

## pan work pending

Show work completed and awaiting review.

```bash theme={null}
pan work pending
```

Lists issues where agents have finished work but haven't been approved yet.

## pan work approve

Approve agent work, merge MR, and update issue tracker.

```bash theme={null}
pan work approve min-123
```

This command:

1. Spawns a merge-agent specialist
2. Reviews the changes
3. Merges the pull/merge request
4. Updates the issue status

## pan work list

List issues from configured trackers.

```bash theme={null}
pan work list
```

Shows issues from Linear, GitHub, or GitLab based on your configuration.

## pan work triage

Triage issues from secondary tracker.

```bash theme={null}
pan work triage
```

Process issues from a secondary tracker (e.g., Rally) and create equivalent issues in your primary tracker.

## pan work reopen

Reopen a closed issue and re-run planning.

```bash theme={null}
pan work reopen min-123
```

Reopens the issue in your tracker and restarts the planning session.

## pan work request-review

Request re-review after fixing feedback.

```bash theme={null}
pan work request-review min-123 -m "Fixed: added tests and removed duplication"
```

For agents, this command has a maximum of 3 auto-requeues to prevent infinite loops.

## pan work wipe

Deep wipe: completely reset all state for an issue.

```bash theme={null}
# Clean up agents, state, Linear status
pan work wipe min-123

# Also delete workspace
pan work wipe min-123 -w

# Skip confirmation
pan work wipe min-123 -y -w
```

This is a nuclear option that:

* Kills any running agents
* Cleans up state files
* Updates issue tracker status
* Optionally removes the workspace

## pan work recover

Recover crashed agents.

```bash theme={null}
# Recover a specific agent
pan work recover min-123

# Recover all crashed agents
pan work recover --all
```

Attempts to resume agents that crashed or were interrupted.

## pan specialists

Manage specialist agents (review, test, inspect, UAT, merge).

```bash theme={null}
# Check status of all specialists
pan specialists status

# Wake a specialist for an issue
pan specialists wake review-agent --issue MIN-123

# View specialist queue
pan specialists queue review-agent

# Clear a specialist's queue
pan specialists clear-queue review-agent

# Reset a specialist's state
pan specialists reset review-agent

# View specialist logs
pan specialists logs review-agent
```

See [Specialist Agents](/features/specialists) for detailed information on each specialist type.

## pan remote

Manage remote workspaces via Fly.io.

```bash theme={null}
# Initialize Fly.io provider
pan remote init

# Configure remote environment
pan remote setup

# Check remote workspace status
pan remote status

# View resource allocation
pan remote resources
```

See [Workspaces](/features/workspaces#remote-workspaces-flyio) for details on remote workspace execution.

## Next Steps

* [Workspace Commands](/cli/workspace-commands) - Manage workspaces
* [Convoy Commands](/cli/convoy-commands) - Multi-agent orchestration
* [Core Concepts](/concepts) - Understand agents and workspaces
