Skip to content

Agent status in every tab

Run five agents in five tabs and the hard part is no longer the typing. It is knowing which one is still working, which one finished ten minutes ago, and which one has been waiting for your “yes” all along. Next Term puts that answer on every tab.

Four tabs from Next Term’s tab bar: a green check on a finished command, a red cross on a failed one, an amber exclamation mark on a tab waiting for a decision, and a blue spinner on a tab where an agent is working.

MarkMeaning
noneAt the prompt, or a plain command running
◌ spinnerAn AI agent is working
✓ green checkAn agent stopped and is waiting for your next prompt, or a command finished. Quiet on purpose, a dark check on a soft green, as nothing needs you yet; plain green with Increase Contrast
! amberAn agent is waiting on your decision (the question is in the tooltip), or a program rang the bell
✕ red crossA command exited with an error (the exit code is in the tooltip)

Each mark is a shape as well as a colour, so it reads without colour vision too. A mark clears when you look at the tab. With the terminal folded, to its tab bar or to its rail beside the editor, no tab is on screen: the tab in front gets its mark, notifications and VoiceOver announcements like any other, and keeps its mark until you open the terminal.

The spinner is reserved for AI agents. It runs while the agent says it is working, or, for an agent whose screen hints are not known yet, while it prints (see How Next Term knows). A build or a test run shows no spinner while it runs; it ends with a check or a cross. A dev server or an editor never shows one at all.

Don’t want it turning? View › Agent Spinner (also in Settings › Notifications) has three choices: Spinning, as it comes; Still, the same blue ring, not turning; and Off, no ring. It changes only the working mark on terminal tabs (in the tab bar or the tab list, a split tab’s pane headers, the » button, and the terminal rail and the collapsed tab list, where an Off tab keeps a small grey dot to click); ⌘O and the window column, looked at rather than watched, keep it still. Done, failed and attention marks stay as they are. With Still or Off, the turning frame Claude Code puts at the start of its title leaves the tab’s title too. Off never hides the state: hovering the tab and VoiceOver still say Working, a split tab shows another pane’s cross or check rather than nothing, and agents read the state over MCP as before. Reduce motion in System Settings › Accessibility › Motion keeps Spinning still, as soon as you turn it on.

When Claude Code, Codex, Command Code or OpenCode asks for permission (“Do you want to make this edit to User.php?”, or OpenCode’s “Permission required: Shell command ($ npm test)”), or Claude Code or OpenCode asks you to pick one of its options (“Which approach should I take?”), the tab turns amber and a notification names the agent and quotes the question. Click it to land on that tab, in that window. This happens even while you are in Next Term, as long as that tab is not the one on screen.

Next Term does not read other agents’ questions yet, Gemini CLI’s and Qwen Code’s among them. When one of them stops to ask, its tab shows done, and the notification says it is waiting for you.

Answer the question in the terminal as usual; the amber mark clears once the question goes away.

Agents › Go to Next Agent Needing You (⇧⌘U) goes to the agent that has waited longest for you, in any window: it brings the window forward and selects the tab, or the pane of a split tab.

  • In this order: decisions (and bells) first, then failures, then agents that finished and commands that ended; within each, the one waiting longest first.
  • Press it again for the next one, round to the first after the last. With nothing waiting, a notice says “No agent needs you right now”, without a beep.
  • A tab on a server whose connection dropped is left out: what it holds isn’t known until it reconnects.
  • The Dock menu (right-click Next Term’s Dock icon) lists the windows waiting for you, the one ⇧⌘U goes to first at the top, each with its most urgent mark. Choose one to go to its agent that needs you most.
  • ⌘O shows every window’s marks in its row, so you see which windows need you before you pick one (see The Welcome window).

File › Go to Anything… (⌘K wherever a terminal doesn’t have the keyboard) lists every tab you have open: this window’s first, then every other window’s, front to back, then the projects you used before. Each tab shows its window, what runs in it and its agent’s mark. Type a few letters of a tab’s name, its folder or its program, as you would in Go to File, and press ↩︎: its window comes forward and the tab has the keyboard. ⎋ or a click elsewhere closes it.

  • In a terminal, ⌘K still clears, and in a Markdown file it still makes a link. Clear Terminal is the panel’s first row, so ⌘K and ↩︎ still clears with the editor in front.
  • One question, once. The second time you clear with ⌘K, Next Term asks, after the clear, whether ⌘K should open Go to Anything in a terminal too. Use ⌘K for Go to Anything moves Clear Terminal to ⇧⌘K there; Keep ⌘K for Clear leaves it. Either way, Settings › Keyboard Shortcuts changes both keys later.

An agent can work in another checkout than the one its tab opened in: Claude Code’s EnterWorktree, or a cd .claude/worktrees/pr-7050 in its shell, Codex’s /cd, a worktree Command Code makes. Next Term follows each local agent tab’s agent to the checkout it works in, the repository’s main one or a linked worktree, and reads that checkout’s branch from git.

A tab gets one mark for it, a hollow branch glyph after its title (in the tab bar or the tab list, and in a split tab’s pane headers), in two cases:

  • Its agent works in another checkout than the window shows: Claude Code in the worktree pr-7050, while the window shows myapp.
  • Its branch was switched under it. Agents that share a checkout share its branch: when one of them switches it, or a shell tab or you do, the files change under every other agent there. Each one that has had a turn is marked. The agent that switched is not, when Next Term can tell which one it was (see below), and neither is one that has done nothing yet: it follows the checkout.

The mark is never red and never blinks. Its tooltip, and what VoiceOver says for the tab, has the facts: the agent, its checkout and branch, and what the window shows; for a switch, the branch the chat was on, the one checked out now, when, and who switched it. The mark clears as soon as its reason ends: the agent is back in the checkout the window shows, or the branch is back. For a branch switched under the chat, the tab’s right-click menu offers Keep Going, which makes the branch now checked out the chat’s own and clears the mark, and Go to That Tab when another tab made the switch. When the tab with the keyboard is marked, the sidebar header says so after the branch, such as “this tab: fix/7027-sso” (see The header).

How Next Term tells:

  • The agent’s own folder. The folder of the agent’s own process, not of the tab’s shell, which stays where the agent was started. For moves the process doesn’t make, the folder the agent’s session record names last: Claude Code’s shell cd, Codex’s /cd, Copilot CLI’s workspace. Of a conversation, only its end is read: at most the last 1 MB at first, then what was added since, so a long tool result after a cd doesn’t lose it (see What Next Term reads).
  • The checkout that holds it is the one with the longest path that contains the folder, in git worktree list: myapp/.claude/worktrees/pr-7050/app is in the worktree pr-7050, although it is inside myapp’s folder too. A cd app/Http in the main checkout is no move, and neither is a folder outside every checkout of the repository, such as a separate clone. The worktrees Claude Code makes for its subagents (.claude/worktrees/agent-…) don’t count.
  • A change counts once it has held for 3 seconds, and not while git is in the middle of a rebase, merge, cherry-pick, revert, am or bisect in that checkout: a rebase that detaches HEAD for a moment marks nothing. New commits made on a detached HEAD (a commit, cherry-pick, revert, am, or a merge onto it) are not a switch, and a branch renamed in place is followed under its new name.
  • Who switched: a switch you make from the branch popup to that branch is yours; a git switch, git checkout, gh pr checkout or the like run in a shell tab in that checkout in the 10 seconds before is that tab’s (a pull, merge or rebase keeps the branch, so it doesn’t count); otherwise, if exactly one agent there was working when the switch happened, it was that agent, and its own branch moves along. With two or more working, the tooltip says how many, and nobody’s branch moves.

Next Term only looks: it switches no branch, and makes or removes no worktree. Remote tabs get no mark.

A Claude Code or Codex tab on this Mac shows a small ring after its title, in the tab bar and in the tab list down the side, filled as far as the agent’s context is used. It is dim, and turns orange from 80%.

  • Hover the tab for the numbers, such as “Context 84k of 200k (42%)”. For Codex, its limits follow, such as “5-hour limit 37%” and “Weekly limit 12%”.
  • Read from the agent’s own transcript, the file its own screen writes, every 5 seconds and only when it grew. Claude Code’s window is 200k, or 1M for a [1m] model or once a conversation holds more than 200k; Codex says its own.
  • No ring when there is nothing to read: another agent, a remote tab, or an agent that has ended.
  • For agents: list_tabs gives the same numbers, as context with used, window and percent (and Codex’s limits).

Settings › Notifications, or the Notifications menu in the menu bar, chooses which of these reach Notification Center (see Settings). By default:

  • A decision notifies wherever you are, in Next Term or in another app (see above).
  • An agent that finished notifies the same way: in Next Term too, for a tab you are not looking at. An agent that stopped is “waiting for you”; an agent that exited (claude -p …) has “finished”. Its screen has to show it stopped for a second first, so a frame drawn halfway is not taken for the end.
  • A tab another agent drives over MCP (it opened the tab, or typed into it) is that agent’s to wait for: while you are in Next Term, its agent finishing does not notify you; from another app, it does. Its decisions still notify. Type in the tab yourself and it is yours again. See Orchestration.
  • A command that finished or failed, such as a build or a test run, notifies only while you are in another app. In Next Term, the tab mark says it already. A failed command says so, with its exit code.
  • Finished work notifies only when it took at least 5 seconds. Settings can raise that to 30 seconds, 1 minute or 5 minutes. A decision or a bell notifies whatever its length.
  • A bell, or a program’s own notification (OSC 9 or OSC 777), marks the tab amber: it needs your attention. It notifies while you are in another app, in the program’s own words when it sends some (stored keys masked, at most 200 characters). A program’s notification that comes within 10 seconds of Next Term’s own for that tab is dropped, so a decision is never replaced by something vaguer.
  • An agent’s own words, from an agent whose screen Next Term reads (such as OpenCode’s “Session error”), mark nothing: the screen gives the mark. They go with the agent’s notification that it finished, or alone a moment later, once until you look at the tab or the agent works again, and not while it asks you something, since that notification says more.
  • Programs built on OpenTUI, OpenCode among them, send their notifications only to terminals they know, so each new tab sets OPENTUI_NOTIFICATION_PROTOCOL=osc777, unless you set it yourself. OpenCode sends its own only when they are turned on in OpenCode, and only when it knows its terminal isn’t in front.
  • Never the tab on screen: none comes for the selected tab of the window you are working in, also while that window’s alert, ⌘P or Find in Files has the keyboard. Another window in front, such as Settings, takes it off screen. Folded, to its tab bar or its rail, the terminal is not on screen, so the tab in front notifies like any other.
  • Each one names its tab and the window’s project (or, without one, the tab’s folder). Click it to land on that tab, in that window.
  • Repeats are held back: each tab replaces its previous notification, and the same message is not repeated within 10 seconds. Several tabs finishing together make one sound, and a window’s notifications stack together in Notification Center.
  • The Dock badge counts the tabs with a mark you have not seen yet, and the Dock icon’s menu lists the windows waiting for you (above).
  • VoiceOver announces when a background tab finishes, fails or needs your attention, since the marks themselves are visual.

The tab marks, the Dock badge and VoiceOver’s announcements come whatever Settings › Notifications says: it chooses only the notifications.

Notifications use macOS’s own Notification Center. Settings › Notifications says whether macOS allows Next Term’s, and whether it shows them as banners. If you declined them at first launch, or set Next Term’s alert style to None, Open Notification Settings… there takes you to Next Term in System Settings → Notifications. Send Test Notification shows one, when macOS allows them; when it does not, the line above says so.

Next Term uses the most reliable source available, in this order.

Next Term starts zsh with its own ZDOTDIR holding a tiny .zshenv. That file points ZDOTDIR back at your real configuration, loads your .zshenv, and adds preexec and precmd hooks that report each command (as typed, and with aliases expanded), its exit code, the working directory and any suspended jobs.

Your .zprofile, .zshrc and frameworks such as oh-my-zsh load exactly as before, and none of your configuration files is edited.

A command Next Term or an agent runs by itself (an agent’s new_tab or send_to_tab, a resume) stays out of zsh’s history, so ↑ and autosuggestions never offer it, and out of Next Term’s record, so suggestions while typing never do either. What you type goes in as before, and a line Next Term only puts on your prompt is yours once you press ↩︎. Your history options and HISTFILE aren’t touched.

AI agents such as claude, codex, commandcode, gemini and opencode stay in the foreground, so Next Term reads the bottom of the agent’s screen the way you would:

  • “esc to interrupt” (or Gemini’s “esc to cancel”, OpenCode’s “esc interrupt”) means the agent is working.
  • A question with choices (“Do you want to…? 1. Yes …”) means it is waiting on you.
  • Claude Code’s own question form means the same, whatever the question says: under its numbered options come “Chat about this” and “Enter to select”. OpenCode’s permission prompt and question form do too (below).
  • Anything else means it is idle, waiting for your next prompt.

Reading the screen keeps the mark in step with the agent: the spinner stops the moment Claude or Codex stops, even if the agent keeps redrawing a clock or a status line. The working hints are checked against Claude Code, Codex, Command Code, Gemini CLI and OpenCode, and the questions against Claude Code, Codex, Command Code and OpenCode. Any other agent, Junie or Qwen Code for example, goes by output timing until its screen shows one of them: printing means working, and 2.5 seconds of silence means done, so an idle agent that keeps redrawing can keep the spinner going. The table in Agents and the IDE link shows which is which.

When the agent says it itself. An agent that reports its own status over OSC 7501, such as Claude Code from 2.1.295, is followed by its reports instead of its screen. It shows as working, or waiting on you (with the question on its screen, or the agent’s own words when the screen shows none), or done. Next Term answers the agent’s check for the protocol, so the agent knows to send it. This keeps the mark right when a custom status line hides Claude Code’s “esc to interrupt”. Inside tmux agents don’t send it, and the screen is read as above.

It does not matter how you start the agent: directly, through an alias or a shell function, with npx, bunx or pnpm dlx (npx opencode-ai@latest, npx @opencode/cli), or as cd app && claude. When a command looks plain (a shell function, say), Next Term also asks the kernel what is really running. OpenCode’s servers, opencode serve, opencode web and opencode acp, show no screen of their own to read, so their tabs are commands, not agents.

Next Term recognises these agents by name: Claude Code, Codex, Gemini CLI, Qwen Code, Command Code, Junie, OpenCode, Aider, Amp, Cursor Agent, Goose, Crush, GitHub Copilot CLI, Droid, Kiro, Amazon Q, Kimi, Plandex, Cline, Auggie and Antigravity (agy).

OpenCode draws its own screen in its own words, so Next Term reads it with rules of its own, and only in a tab that runs OpenCode or that OpenCode titled (“OpenCode”, or “OC | ” and its session’s title, as in a remote tab):

  • Working: its footer says “esc interrupt” (“esc again to interrupt” after one ⎋, “esc stop” with --mini).
  • Done: its footer is back without that hint, listing the keys for its commands and agents, or its empty prompt says “Ask anything…”. Its start and its redraws never count as a finished turn.
  • A permission: “△ Permission required” over a row of buttons. The question is “Permission required:” and what it asks about, such as “Permission required: Edit src/app.ts”, with a command quoted whole: “Permission required: Shell command ($ npm test)”. Tokens, passwords and your stored keys in it are masked, and it is cut at 200 characters. The choices are the buttons: Allow once, Allow always (Always allow in OpenCode 2) and Reject.
  • The steps after it: “Always allow”, with Confirm and Cancel (OpenCode 1.19), and “Reject permission”, which asks what OpenCode should do instead. Each is a new question, with a new question_id for agents.
  • A question with options: its question over numbered options, with the hint “esc dismiss”. The choices are the options, without “Type your own answer”. A form with several questions, or a question that takes several answers, is reported with no choices.
  • Its border and sidebar never hide a question: the “┃” down the left of its boxes is left out, and so is the sidebar it shows beside the session in a pane wider than 120 columns.

What to know:

  • Taken from OpenCode 1.19, and the permission prompt from OpenCode 2.0 too. A release that draws its screen differently may not be read this way.
  • A narrow pane where OpenCode leaves out its footer’s hints goes by output timing.
  • The selected button is told by its background. OpenCode marks it no other way, so answer_agent reads the colours. In a theme that gives every button the same background, only Reject can be answered that way. The mouse moves OpenCode’s selection too, so a pointer moving over its buttons just as an agent answers can change the choice.

For bash and fish, or after exec bash, Next Term asks the kernel for the terminal’s foreground process and working directory twice a second.

Interactive programs (vim, ssh, less, htop, database shells, REPLs and the like) are never reported as done: they are waiting for you by design.

Closing a tab or quitting asks first if a program is running, or a job is suspended (⌃Z) or in the background, and names it, for example: Quitting stops “npm run dev” (running).

Closing a tab or window, or quitting, also stops what the tab’s program started in the background, such as a dev server an agent ran for you, and the alert names it: “next-server” (started by claude). What you meant to outlive the tab keeps running: programs started with nohup, disowned jobs, ( cmd & ), setsid, tmux, herdr and GNU screen sessions, the jobs of a nix develop shell, and remote tabs. Each program is sent a hangup (SIGHUP), and one that catches it and goes on gets a SIGTERM a second later. Nothing is force-killed, and a program that ignores hangups is named as one that keeps running.

Status reports from the shell carry a random secret for each tab that programs never see. Output in the terminal — a cat of a log, a remote host over ssh — cannot fake “command finished” and skip the close confirmation. See Security and privacy.

ActionHow
New tab (in the project, or the current tab’s folder)⌘T or the + button
Close tab⌘W (the focused pane, in a split tab), or middle-click the tab
Select tab 1–8, or the last tab⌘1–⌘8, ⌘9 (each tab shows its own)
Next or previous tab⇧⌘] and ⇧⌘[, or ⌃⇥ and ⌃⇧⇥
Rename a tab⌥⌘R, or double-click it
Go to any tab, in any window, by name⌘K outside a terminal (Go to Anything)
Split a tab into panes⌘D right (outside the editor), ⇧⌘D down
Duplicate a tab (a new tab in its folder)File › Duplicate Tab
Reopen the tab you closed last⇧⌘T (File › Reopen Closed Tab)
Close the other tabs, or the tabs to the rightFile › Close Other Tabs, Close Tabs to the Right (pinned tabs stay)
Pin a tab, so it stays first and nothing closes it by accidentFile › Pin Tab, or right-click the tab (Pinned tabs)
ReorderDrag a tab sideways, or up or down in a tab list
Everything for one tabRight-click it

Settings › Terminal › New tabs chooses where ⌘T opens a tab instead: always in the current tab’s folder, in your home folder, or in a folder you choose. The same tab has the cursor (block, bar or underline, blinking or not) and how much scrollback each terminal keeps, 10,000 lines unless you choose. See Settings.

A tab running a local dev server (langgraph dev, npm run dev, uvicorn and the like) adds its port to its title, such as “app · :5173”, once the server prints its address. File › Open Served URL opens that address in your browser. It is only for commands you run, not agents, and not remote tabs, where localhost is the server’s own.

With two or more tabs, each one shows the shortcut that selects it, where its × button appears (before the × on the selected tab, when there is room). A shortcut you change in Settings shows as changed.

A split tab shows the mark of its most urgent pane; see Split panes. Tabs that do not fit go behind the » button, which shows how many are hidden and the most urgent mark among them. Tabs can also sit in a list down the terminal’s left or right, which scrolls instead; see Where the tabs go. A program can set its own tab title; a name you give a tab wins over it.

  • A tab: Rename…, Split Right, Split Down, Duplicate Tab, Pin Tab (Unpin Tab on a pinned one), Close Tab, Close Other Tabs and Close Tabs to the Right (Close Tabs Below in a tab list). They act on the tab you clicked, in front or not. Closing several tabs asks once if that would stop anything, and names it, as closing one tab does.
  • The terminal: Copy, Paste, Select All, Clear, Find…, Split Right and Split Down, plus Send Selection to Agent when text is selected and an agent runs in the window (see Send to Agent). On a link or a path, the ones ⌘-click opens, the menu starts with Open Link and Copy Link, or Open (the file, in the editor at its line) and Reveal in Finder. The pane you click takes the keyboard first, as a click would.

Each command except the link and path ones shows its shortcut and is in the menu bar too, so you can give it one in Settings › Keyboard Shortcuts.

Pin a tab you can’t lose, such as a long-running agent or a dev server: right-click it and choose Pin Tab, or File › Pin Tab for the tab in front. Unpin Tab undoes it.

  • It stays first. A pinned tab moves to the front of its window, after any you pinned before, and dragging keeps pinned tabs together. A thin line sets them apart from the rest, in the tab bar and in a tab list.
  • It shows a pin where its × would be.
  • Nothing closes it by accident. Close Other Tabs and Close Tabs to the Right leave it open. ⌘W on it asks first, Close the pinned tab “api”?, and says what closing would stop.
  • It comes back pinned after a quit, an update or Reopen Closed Tab.
  • Agents see it. list_tabs marks it pinned, and an agent’s close_tab on it always asks you on the Mac first. Agents can’t pin or unpin.

Pin Tab has no shortcut until you give it one in Settings › Keyboard Shortcuts.

⇧⌘T (File › Reopen Closed Tab) brings back the terminal tab you closed last, in its folder and with the name you gave it, pinned if it was, in the window it was in while that is open. Press it again for the one before. It comes back with a fresh shell: what ran in it ended when it closed. A tab that nothing ran in, that stayed in the folder it opened in and that has no name of its own isn’t kept. A remote tab comes back on its server; one that tmux kept reattaches to its session, which closing the tab only detached from.