pub struct Node {Show 21 fields
pub schema_version: u32,
pub node_id: NodeId,
pub run_id: RunId,
pub parent_node_id: Option<NodeId>,
pub kind: Kind,
pub status: Status,
pub task: Option<String>,
pub worktree_path: Option<String>,
pub branch: Option<String>,
pub base_sha: Option<String>,
pub tmux_window: Option<String>,
pub tmux_identity: Option<TmuxIdentity>,
pub agent_pid: Option<i32>,
pub agent_pid_start_time: Option<DateTime<Utc>>,
pub supervisor_pid: Option<i32>,
pub children: Vec<ChildRef>,
pub started_at: Option<DateTime<Utc>>,
pub updated_at: DateTime<Utc>,
pub last_report: Option<Value>,
pub last_processed_report_seq_by_child: Map<String, Value>,
pub retry_attempts: u32,
}Expand description
nodes/<node-id>.json (design.md §1.3).
Fields§
§schema_version: u32State-schema version this file was written with.
node_id: NodeIdUnique node identifier within its run (e.g. n-0001). Validated on
read; this is the projection’s filename key, so it can never name a
path outside nodes/.
run_id: RunIdRun this node belongs to. Validated on read.
parent_node_id: Option<NodeId>Parent node within the same run, if this is a sub-node.
kind: KindKind of work this node performs.
status: StatusCurrent node status.
task: Option<String>Task description / prompt driving the node, if recorded.
worktree_path: Option<String>Filesystem path of the node’s git worktree, if created.
branch: Option<String>Git branch the node works on, if any.
base_sha: Option<String>The commit SHA the node’s branch/worktree was forked from at spawn
(the branch tip the moment create.sh materialized the worktree). It
is the fixed reference point that lets the supervisor tell “this branch
produced work that merged into source” from “this branch never diverged
from its fork point”: a branch still at base_sha is trivially an
ancestor of its source branch but has merged nothing, so it must NOT be
reconciled to success or torn down (that would drop a live agent’s
uncommitted work). Only a branch whose tip has moved past base_sha
and is now an ancestor of the run’s source_branch is a confirmed
merge (issues false-failed-after-merge /
supervisor-stuck-pending-after-self-merge). #[serde(default)] keeps a
node written before this field existed readable (None → the
git-reconcile fallback simply does not fire for it).
tmux_window: Option<String>tmux window hosting the node’s agent, if interactive. This is the
human-readable window name — not unique across sessions and blind to
non-default sockets. Kept for display and as the legacy liveness key;
prefer Node::tmux_identity when present.
tmux_identity: Option<TmuxIdentity>Fully-qualified tmux identity (session:window_id + socket path)
captured at spawn time. None for nodes registered before create.sh
emitted the qualified fields — those fall back to bare-name matching on
Node::tmux_window. New spawns always populate this when create.sh
returns it.
agent_pid: Option<i32>PID of the running agent process, if live.
agent_pid_start_time: Option<DateTime<Utc>>Start time of the agent process, used to detect PID reuse.
supervisor_pid: Option<i32>PID of the supervisor watching this node, if live.
children: Vec<ChildRef>Children this node has spawned.
started_at: Option<DateTime<Utc>>When the node started executing, if it has.
updated_at: DateTime<Utc>When the node file was last modified.
last_report: Option<Value>The node.report payload that drove this node to its terminal status.
Set only by the report that actually transitions the node (Done /
Failed / Cancelled). Once the node is terminal it is frozen: a late
report against an already-settled node is dropped without overwriting
this field (see reducer::apply_node_report). So for a node cancelled
by run cancel, this holds the synthesized cancel report, not a
later-arriving agent report — that payload remains only in
events.jsonl.
last_processed_report_seq_by_child: Map<String, Value>Highest report seq consumed per child run id, for idempotent
report processing across supervisor restarts.
retry_attempts: u32Number of times the supervisor has auto-retried this node after an
empty-handed agent-died (issue autoretry-agent-died-worker). The
DURABLE, restart-safe bound on the bounded-retry loop: each node.retry
event increments it, and the watchdog terminalizes the run failed once
it reaches RETRY_MAX_ATTEMPTS. #[serde(default)] keeps a node written
before this field existed readable (0 — never retried).