Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

share

Upload a local agent session to your workspace, or list available sessions before choosing one.

Usage

span share --list [--agent AGENT] [--cwd DIR] [--json] span share [--session UUID | --source-path FILE | --all] [--trace-agent UUID] [--agent AGENT] [--cwd DIR] [--project UUID] [--key KEY] [--json] [--follow [--runtime-only]] [--reasoning-summaries] [--agent-responses] [--prompts]
Without a selector, sharing uses the current agent session when its environment identifies it. Otherwise, exactly one session must match the current directory and agent filter. If several match, list them and select a session explicitly.
--all shares every matching local session once, including matching native descendants. It searches across local projects unless you supply --cwd; --agent filters the harness. It ignores the current-session environment. The selected set is limited to 1,000 sessions. Use directory or harness filters for larger catalogs. --all cannot be combined with --follow.
Use --trace-agent to assign the selected session and its descendants, or every session selected by --all, to a persistent workspace agent. This UUID is separate from the --agent harness filter. Omitting it preserves existing agent assignments. The CLI validates the UUID and checks the agent before uploading any batches. API keys need traces:read for this check and traces:write for upload.
New sessions go to the workspace’s default project unless you supply --project. Creating another project does not change this default. Sharing an existing session without --project preserves its assigned project.
Workspace admins can change the default in Settings → Projects. This affects new sessions; existing sessions keep their project. Deleting a project moves its traces to the current default. Choose another default before deleting the default project.

Options

OptionDescription
--listList matching local sessions without uploading.
--allShare all matching local sessions once; searches across projects unless --cwd is supplied.
--trace-agent UUIDAssign uploaded traces to a persistent workspace agent from span agents list.
--session UUIDSelect an exact session UUID.
--trace-id UUIDAlias for --session.
--source-path FILESelect a local transcript file directly.
--agent AGENTSelect a supported agent; claude is also accepted.
--cwd DIRSelect the project directory; defaults to the current directory.
--project UUIDAssign the session and its native descendants to a shared workspace project. Copy its ID from Settings → Projects.
--key KEYShare with a scoped workspace API key. Requires traces:write and takes precedence over a saved login.
--jsonPrint a JSON session list or upload result.
--followKeep a Codex session's runtime status and new trace events synchronized until Ctrl-C. Requires lsof and ps.
--runtime-onlyWith --follow, report runtime status for an already-shared session without uploading transcript events.
--promptsInclude visible user prompts in the shared conversation.
--agent-responsesInclude visible assistant replies in the shared timeline.
--reasoning-summariesInclude available provider-shared summary text when sharing. Cannot be combined with --list.
--help, -hPrint command help.
Choose only one of --list, --session, --trace-id, --source-path, or --all. --trace-agent cannot be combined with --list or --runtime-only. Content-selection flags (--prompts, --agent-responses, and --reasoning-summaries) cannot be enabled with --list. Explicit agent and directory filters must match a selected source file.

Examples

span agents create --name "Release assistant" --description "Release preparation" --json span agents list --json span share --all --agent codex --cwd . --trace-agent AGENT_UUID --json span share --list --agent codex --json span share --session 6b2863cf-ce34-405e-af75-27748912d239 --json span share --source-path ./session.jsonl --reasoning-summaries span share --session 6b2863cf-ce34-405e-af75-27748912d239 --project 913c523a-9815-4a18-a187-6f5d433819a1
To associate existing shared traces without uploading local content, use span traces assign-agent --trace-agent AGENT_UUID --all. Add --project PROJECT_UUID to limit the workspace project, or repeat --session SESSION_UUID for an explicit selection. This command uses your saved login and updates at most 1,000 traces atomically. The sharer or a workspace admin must be allowed to manage every selected trace; a permission error leaves the selection unchanged.

Output and credentials

To keep a running Codex session's Active / Inactive status current, run span share --agent codex --session UUID --follow. The observer checks native turn lifecycle records and the live transcript writer every five seconds. Quiet work stays active until the turn finishes, is interrupted, or loses its writer. Runtime reports expire after 45 seconds without renewal. Historical trace views use recorded evidence instead of current runtime status.
With --follow --json, the initial upload receipt is followed by runtime receipts, one JSON object per line. Following applies to the selected session; its existing native descendants are included in the initial share.
Use --follow --runtime-only to update status independently of transcript uploads. This requires an existing shared trace and emits only runtime receipts with --json.
Single-session sharing includes the title shown in the local trace browser. Bulk sharing derives titles from the selected transcripts’ first prompts. When the harness has no saved title, the browser may use the beginning of the first prompt.
Uploads use an explicit --key, then your saved login, then HALFSPAN_API_KEY, then HALFSPAN_INGEST_TOKEN. The API origin for key-based uploads defaults to https://app.halfspan.com; override it with HALFSPAN_API_URL. With --all --json, output is an array of upload receipts. JSON upload results include session, agent, trace_path, inserted, total, an optional url, and children receipts when descendants are shared. Retry the same share after a partial failure; identical events are deduplicated.

Share a Claude subagent

Use span share --agent claude --list --json to find subagents by source_id and parent_session. Pass the child session UUID to --session, select its JSONL file with --source-path, or select the subagent in span traces and press s. Sharing a Claude Code or Codex session also uploads its discovered native descendants with the same content controls. Select a child session to share that subtree. Automatic session selection uses the main transcript.
A share is bounded to 256 sessions and 32 descendant levels; select a smaller subtree if it exceeds those limits. If a session fails after earlier sessions were accepted, the error reports the confirmed count and failed session. Retry the same share to finish; accepted identical events are deduplicated.
For a validated subagent, the parent session UUID identifies the swarm. The importer preserves the native agent ID and records the parent reference from the transcript path and header. Swarm project and environment labels are shown as unknown; --project assigns the shared trace project independently. The child uses the same workspace credentials, content controls and unshare flow as a regular session. Metadata-only shares use the subagent ID for the title.

Privacy and retention

Command-line sharing excludes prompts, replies, and summaries unless their flags are set. The terminal share dialog starts with prompts and replies selected. Manual shares include the local session title, which may derive from the first prompt. See Privacy and shared data before sharing sensitive sessions.
An enabled local redaction policy filters selected content and titles before upload. The same policy applies to automatic hooks and imported batches.
Uploaded sessions expire 30 days after server-side creation. Use unshare to remove shared evidence early; see Data retention and deletion for resharing and local copies.