# Agents, CLIs and status

> Which agent CLIs nsq runs, how it knows exactly when one is working, needs you or finished, and what it never touches.

Source: https://docs.neurosquad.ai/en/cli/agents

## Supported CLIs

| CLI | `nsq run …` | Status from |
| --- | --- | --- |
| Claude Code | `claude` | Claude Code's hooks, checked against its session transcript |
| Codex CLI | `codex` | Codex hooks |
| OpenCode 1.x and 2.x | `opencode` | an OpenCode plugin (nsq tells the two versions apart itself) |
| Any command | `-- <command…>` | its output (no hooks) |

Install and sign in to each CLI the usual way — nsq starts the copy on your `PATH`, under your own
login. More CLIs will follow on demand:
[ask for one](https://github.com/glmn-ai/neurosquad-cli/issues/new?template=harness_request.yml).

## How nsq knows what an agent is doing

nsq does not guess from the screen. Each CLI reports its own lifecycle through **hooks** (a plugin
for OpenCode) to nsq on this machine only (`127.0.0.1`, a secret per agent):

- **working** — a turn started;
- **needs you** — the CLI is blocked on you: a permission prompt ("Claude wants to run: npm test"),
a question, a plan to approve. You see the CLI's own text;
- **finished** — the turn ended and the answer is on screen;
- **idle** — back at its prompt with nothing new (you dismissed a question, interrupted, or it
restarted).

Your own keys count too: answering a waiting agent in its terminal moves it to working at once.
For Claude Code, nsq also reads the tail of the session transcript, which catches interrupts, API
errors and queued prompts that send no hook.

A plain command (`nsq run -- …`) has no hooks: output means working, a few seconds of silence mean
finished, and it never claims to need you.

## Your configuration is never written

Everything nsq needs is passed per agent — command-line flags, environment variables and files in
`~/.neurosquad-cli/layers/`. Your `~/.claude`, `~/.codex` and `opencode.json` are never touched.

## Sessions and resume

Each agent keeps its CLI session. `nsq restart`, `nsq start` and the daemon's own restart
(`nsq down`, then `nsq up`) resume the session instead of starting over. If the CLI no longer has
that session, a fresh one starts.

## Interrupting

`i` in the dashboard or `nsq interrupt <agent>` sends the key that CLI actually uses to stop a turn
— Escape for Claude Code and Codex, Escape twice for OpenCode — not Ctrl+C, which would quit some of
them.

## Dangerous mode

`--dangerous` (or `d` in the dashboard, or `nsq set <agent> --dangerous on`) lets the agent
run without asking for permission. For Claude Code it switches live; for the other CLIs it applies
from the next start, and nsq tells you when a restart is needed.

> In dangerous mode an agent can run any command and change any file it can reach. Use it in a
> worktree or a throwaway folder.
