Harness Notes

JSON

Commands

5 records · Updated 2026-10-15

The command for each task, in each harness. Pick what you are working with, then read across: commands you type in your shell or a script and commands you type inside an open session are listed separately. Commands for renaming sessions are on Thread naming and importing from another harness on Migration.

From your shell

Commands you run in a terminal or script, outside a session.

TaskCodex CLIchecked at 0.162.1Claude Codechecked at 2.1.296Cursor Agentchecked at 2026.10.12-d47ca18OpenCode 2.xchecked at 2.0.28pichecked at 1.2.0
Set up
Create——

agent create-chat

Create a new empty chat and print its id.

——
Import———

opencode session import <file> [--directory <dir>]

Import session data from a JSON file or URL.

1 note
—
Use
Open the manager

codex agents

Open the agent command center for sessions on the shared local or a remote app-server.

2 notes

claude agents [options]

Open agent view to monitor and start supervised sessions.

1 note
———
List—

claude agents --json [--all] [--cwd <path>]

Print active interactive and background sessions as JSON.

1 note

agent persist list

List persistent sessions.

opencode session list [-n N] [--format table|json]

List top-level sessions in the current project, newest first.

1 note
—
Show logs—

claude logs <id|name>

Print a supervised session's recent output.

———
Start in the background—

claude --bg [--name <name>] [prompt]

also claude --background [prompt]

Start a supervised session that keeps running without a terminal, and print its short id.

2 notes

claude --bg --exec <command>

Run a shell job under the supervisor instead of a model session.

1 note

claude --bg --agent <agent> [prompt]

Start a supervised session whose main agent is a named subagent definition.

1 note

agent persist [options] [prompt...]

Start a session that keeps running after a terminal or SSH disconnect.

——
Send a message

codex queue --thread <THREAD> --message <TEXT>

Queue a text message for an existing session by UUID or exact name.

1 note
————
Attach—

claude attach <id|name>

Open a supervised session in this terminal, restarting it if it exited.

1 note

agent persist attach <session>

Reattach this terminal to a running persistent session.

opencode --server <url>

Connect the client to a specific server instead of the background service.

1 note
—
Resume

codex resume [SESSION_ID] [PROMPT]

Resume a saved interactive session by UUID or name, with a picker by default.

2 notes
—

agent ls

Open a picker of previous chats and resume one.

1 note

agent resume

also agent --continue

Resume the most recent chat.

agent --resume [chatId]

Resume a chat by id, or open the picker.

opencode [directory] (--continue | --session <id>)

also opencode -c, opencode -s <id>

Continue the last session or a given one.

1 note

pi --continue

also pi -c

Continue the most recent session for this project.

pi --resume

also pi -r

Open the session picker to choose a saved session.

1 note

pi --session <path|id>

Open a session by file path, exact id or partial id.

1 note
Fork

codex fork [SESSION_ID] [PROMPT]

Fork a saved session into a new chat, with a picker by default.

2 notes
——

opencode run (--continue | --session <id>) --fork

Fork the session before continuing.

1 note

pi --fork <path|id>

Fork a saved session into a new session for this project.

Export———

opencode session export [<session>] [--sanitize]

Export session data as JSON.

1 note

pi --export <file> [output]

Export a session file to HTML.

Change
Restart—

claude respawn <id>|--all

Restart one supervised session, or every running one, on the installed binary.

———
Archive

codex archive <SESSION>

Archive a saved session by id or name.

1 note
————
Unarchive

codex unarchive <SESSION>

Restore an archived session by id or name.

1 note
————
Remove
Stop—

claude stop <id>

also claude kill <id>

Stop a supervised session's process while keeping its conversation.

agent persist stop <session>

Stop a persistent session.

——
Delete

codex delete <SESSION>

Permanently delete a saved session by id or name.

1 note

claude rm <id> [--discard-unpushed <commit>@<worktree-id>] [--force-remove-worktree <worktree-id>]

Remove a supervised session from the list, and its worktree when safe.

1 note
—

opencode session delete <sessionID>

Delete a session and its child sessions.

—

Inside a session

Slash commands you type into an open session.

TaskCodex CLIchecked at 0.162.1Claude Codechecked at 2.1.296Cursor Agentchecked at 2026.10.12-d47ca18OpenCode 2.xchecked at 2.0.28pichecked at 1.2.0
Set up
Import————

/import <path>

Import a JSONL session file and resume it.

Use
Open the manager

/agents

Open the agent command center from inside a session.

1 note
————
Start in the background—

/background [prompt]

also /bg [prompt]

Move the current conversation into a supervised session and free the terminal.

1 note

& <message>

Hand the conversation to a Cloud Agent that keeps running remotely.

1 note
——
Detach——

/detach

Leave the persistent session running and return to the shell.

——
Resume

/resume [session]

Open the saved-session picker, or resume a session by id or name.

—

/resume

Open recent chats and resume one.

/sessions

also /resume, /continue

List sessions and switch to one.

1 note

/resume

Switch to another saved session through the picker.

Fork

/fork [name]

Fork the current chat, optionally into a new managed worktree.

/fork [prompt]

Copy the current conversation into a new supervised session.

1 note

/fork

also /branch, /duplicate

Fork the current chat into a new session.

/fork

Fork the current session from a chosen message.

/fork

Create a new session from an earlier user message.

/clone

Duplicate the current session at its current position.

Export———

/export

Export the current session transcript.

/export [path]

Export the current session as HTML or JSONL.

Share————

/share

Upload the session as a shareable link.

1 note
Change
Archive

/archive

Archive the current session after confirmation.

1 note
————
Remove
Stop—

/stop

Stop the background session you are attached to, keeping its transcript and worktree.

1 note
———
Delete

/delete

Permanently delete the current session and its subagent threads after confirmation.

1 note
———

/resume, then Ctrl+D

Delete a saved session from the picker.

1 note

Notes and sources

Codex CLI
Claude Code
Cursor Agent
OpenCode 2.x
pi