Attachment and artifacts
Parent: Agents and delegation.
Observe any delegated run without owning its execution. In the interactive TUI, /attach opens a full-screen picker of subagents from the current directory, even when none are running. It starts on running runs. Ctrl-R shows finished transcripts from this directory so you can reopen an old run. Rows show the agent role, generated title, and current tool or final state. Enter opens the selected run in place. Escape leaves without attaching. Clicking a subagent row in the activity rail opens that run directly.
Runs started by a saved interactive session store durable artifacts with that session:
~/.rho/sessions/<workspace-key>/<created-at>_<session-id>/subagents/<id>/Parentless runs, and runs started by rho run --no-save, remain under ~/.rho/subagents/<id>/. Runs from resumed legacy flat sessions also remain there because those sessions have no folder to own them. Existing global runs are not moved.
Each run directory can contain:
result.json- live status, agent ID, runtime (rho,claude-cli,cursor, orantigravity), provider, model, reasoning level, start/finish timestamps, semantic fingerprint, usage, final result, optionalparent_session_id, and, for external runtimes, optionalruntime_session_idandruntime_model(the ACP session id and the concrete model the runtime reported; read them according toruntime: onlyclaude-clisession ids have a resume command). Rho 3 writes these names and still reads the rho 2.x namesclaude_session_idandclaude_modelevents.jsonl- append-only display history used by attachment replaytool-previews.json- replaceable live tool-argument cards, when arguments stream; attach combines these with the journal without retaining every growing snapshotlog.txt-claude-agent-acpstderr forruntime: claude-cliruns, Cursor stderr forruntime: cursorruns,agy acpstderr forruntime: antigravityruns
On a slow disk, terminal status can appear before the background writer appends its terminal display event. If recording cannot keep up, attachment_error in result.json reports that the journal is incomplete; the writer still appends its terminal event when the journal remains writable. Journal errors do not change the run's success, failure, or cancellation state.
Complete tool starts, execution progress, results, and terminal outcomes remain in the journal. Live argument previews stay responsive, but exact token-by-token argument replay is not retained. Orderly interruption saves the latest unfinished preview once; after an abrupt exit, attach can still read the last live snapshot. Older journals remain readable without a preview file. Existing logs are not rewritten. If live preview publication fails, the journal records a notice and continues retaining durable events and the latest input at its lifecycle boundary.
Run IDs stay globally unique. Opening a listed run first checks the global run index, then scans folder-layout sessions, then checks the legacy global path. The /attach picker lists only the runs started in the current directory, so runs from another directory, and older runs the index has no directory for, cannot be opened from the TUI.
Detaching does not cancel execution. The interactive TUI opens this viewer in place and does not own the delegated task. Artifacts remain available for post-run inspection and may contain prompts or workspace content.
Attach uses the interactive session's display settings: show_reasoning_output, zen_mode, max_tool_output_lines, and theme. Reasoning and tool events stay in the journal; the view filters them when painting so hide-reasoning and zen match the main session. Click a truncated tool card, or press Ctrl+O, to expand or collapse it.
A direct automation run can persist the same status contract:
rho run --agent explorer --output-file /tmp/result.json "where is auth handled?"Root session metadata stores the selected agent ID and fingerprint. Resume fails explicitly when that identity is missing or when the selected definition changed. Unchanged default Rho definitions still resume when the session stores the pre-runtime-axis v1 fingerprint.