Agent sessions
An agent session runs an agent in a tab the way an editor does: through the agent’s own protocol, instead of through its terminal screen. Next Term hears each turn start and end, each tool call and each permission request from the agent itself, so the tab’s mark is exact, and an agent steering it gets the turn’s end and the agent’s last message as they are, not read off a screen.
It is an addition. Running an agent in a tab as you always have stays the default, and that is still where the agent’s own screens and commands are (see What stays in the terminal tab).
Start a session
Section titled “Start a session”- Agents › New Agent Session… lists the agents installed on your Mac that can run as a session. Pick one, type a first prompt if you like, and Start: the session opens in a tab of the window’s project, named after the agent. For Claude Code and Codex, a line under the picker says what stays in their terminal tab.
nxtrm agent claudein any tab does the same there.--prompt "…"sends a first prompt at once, andnxtrm agentalone lists the agents and which of them are installed.
The agents it knows:
- Claude Code (
claude), run asclaude -pover its stream-json. - Codex (
codex), run ascodex app-server. - Agents that speak the Agent Client Protocol (ACP): Gemini CLI (
gemini), Qwen Code (qwen), OpenCode (opencode), Cursor CLI (cursor), Copilot CLI (copilot), goose (goose), Kimi CLI (kimi), Auggie (auggie), Kiro CLI (kiro), Cline (cline), Junie (junie), Factory Droid (droid), Devin CLI (devin) and Mistral Vibe (vibe).
With none installed, the menu says so and names some.
Your own CLI and login
Section titled “Your own CLI and login”Each session runs the program on your PATH, the one you installed, signed in as you signed it in. Next Term installs none of them, never reads, stores or forwards their tokens, and offers no login: to sign in, run the agent in a tab as usual. An agent that quits before its session starts, because it is signed out or is a version that can’t run as a session, says why in its own words, with a note to run it in a tab to sign in or update it.
Which version runs. A session names its CLI’s version when it starts, and says once when the version changed since the last session.
When a CLI changes. An update to Claude Code or Codex can change how it talks to Next Term. If it keeps sending what Next Term doesn’t recognise, or never starts, the session ends with a note to use the terminal tab for now, instead of hanging.
What the tab shows
Section titled “What the tab shows”The tab draws the session as text:
- your prompts and the agent’s words as they stream, its thinking folded to one line;
- each tool call, with its status;
- the files it changes, with their line counts;
- its plan as a checklist: Claude Code’s todo list, Codex’s plan, or an ACP agent’s plan;
- how each turn ended, Done, Stopped, Refused, Hit the token limit or Hit the turn limit, with its usage where the agent reports it.
Type a prompt and press ↩︎ to send it. ⌃C or ⎋ stops a turn, and ⌃D on an empty line ends the session. In a Next Term tab, the agent gets Next Term’s MCP tools too.
As a chat
Section titled “As a chat”An agent session can show as a chat instead of its text view: tick Show as chat in New Agent Session…, or switch with the tab’s chat button. It works for every agent a session can run, Claude Code, Codex, OpenCode, Cursor’s agent and the other Agent Client Protocol agents, because it is drawn from the session’s own events:
- Replies stream in as the agent writes them.
- Permission requests are cards with the agent’s own buttons.
- What you type goes to the agent; a message typed before it is ready is sent once it is.
- The terminal button brings back the session’s text view.
Agents can open one too: new_tab takes view: "chat", and switch_view switches it. For a plain Claude Code, Codex or Command Code tab started by typing its command, see See an agent’s session as a chat.
Permission requests
Section titled “Permission requests”When the agent asks permission, the tab turns amber, as for any agent that needs you, and the request is a menu of the agent’s own choices, with the whole command it wants to run. For Claude Code and Codex they are Allow once, Allow always and Reject. The notification has them as buttons. Claude Code’s questions show as a menu too.
Allow always is asked on your Mac first, and lasts for this session only. Picked in the menu, whether by you or by an agent steering the session, it opens an approval window on the Mac that names the agent and the whole command, and the agent hears nothing until you approve there. Decline and the request stays open, for another answer. Claude Code’s Allow always is offered only when Claude suggests a rule for this session; a session outside Next Term’s tabs can’t ask, so it doesn’t offer Allow always at all.
In 0.11.44 that window opened, but its buttons did nothing and the session kept waiting. From 0.11.45 it answers.
Trust this folder first
Section titled “Trust this folder first”claude -p runs a folder’s hooks and MCP servers, and loads its CLAUDE.md and plugins, without asking. So before Claude Code’s first session in a folder, Next Term asks on your Mac whether to trust it: Trust Folder for that exact folder, not the folders in it. Only a click answers it. Decline and nothing runs. Outside Next Term’s tabs, a folder you haven’t trusted is refused.
Sessions survive an update
Section titled “Sessions survive an update”A Claude Code or Codex session tab comes back after Next Term updates, and after a quit you let resume, and goes on with the same conversation: Next Term runs nxtrm agent claude (or codex) with --resume and the session’s id. If that conversation can’t go on, the session starts a new one and says so. Other agents’ sessions come back as a new session, with a note.
What stays in the terminal tab
Section titled “What stays in the terminal tab”A session is the agent’s conversation, not its whole interface. These stay in a tab running the agent as usual:
- Claude Code:
/usage,/rewindand/login, and its plugin and MCP panels. - Codex: its own screens, such as
/statusand/approvals.
For agents
Section titled “For agents”An orchestrating agent starts a session with new_tab’s agent_session ("claude", "codex", "gemini" and the rest) instead of command, with its first prompt. A name Next Term doesn’t know, or one not installed, is refused before any tab opens, with the names that would run.
wait_for_tabreturns when the turn ends, or when the agent asks permission.read_tabandwait_for_tabaddagent_session,stop_reason(end_turn,max_tokens,max_turn_requests,refusalorcancelled) andlast_message, the agent’s whole last message, with stored keys masked. A permission request’s whole command is in the screen text.list_tabs,read_tabandwait_for_tabgiveagent_version, the CLI’s version, andmodelwhen the agent names them.answer_agentanswers a permission request, as it answers any agent’s question. Allow always still waits for you on the Mac, and so does trusting a folder.
