How the engine's raw agent state becomes a group in the sidebar and a count on a checkout row.
The state of an agent is five axes, not one word. What it needs from the operator, whether it is running, whether it has reported a completion, whether the operator has looked at it, and whose work it is are independent, and mixing them into one string is what made the same agent read differently in different views.
- Demand: question, approval, error (shown as Blocked, see below), none.
- Activity: working, stopped, unknown.
- Completion: reported, not reported.
- Read: read, unread.
- Ownership: operator, delegated, Hide AI's, for work a Hide-started agent does for a screen that owns it, or a Hide Bot thread's, for a session a thread started under itself; a bot's (
Tool) stays in the types and nothing sets it since PRD external-connections D-12.
hide-core/src/agent_state/axes.rs is the single owner of all five.
agent_state/turn.rs derives the group, request verb, close and rest gates from them; sidebar.rs assembles the snapshot rows.
It also derives everything a view draws from them - the group, the mark, whether the row is emphasized, the status word, the descendant mark, and whether closing the pane needs a confirmation or a fresh status check - so no surface decides any of it a second time.
Ownership is not stored anywhere.
It is read back off the row: a row whose lineage depth is greater than zero is delegated, a root whose Hide AI snapshot names a home is Hide AI's, a root whose tool mark says its tool keeps it is that tool's, and every other row, including an orphan whose parent is gone, is the operator's.
ownership_of is the only function that makes that judgement, and apply_lineage reapplies every derived value once the lineage is known.
This guide is kept as pieces under docs/status-model/, one file per subject, each naming the code it covers.
Read this table, then the pieces whose Code paths cover what you change.
The headings after the table keep every section name and anchor this file had, so a reference such as docs/status-model.md, <section> still lands here and names its piece.
| Piece | Code |
|---|---|
| Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps | hide-core/src/agent_state/axes.rs, hide-core/src/runtime/tests/tool_work.rs, hide-core/src/runtime/memory_promotion.rs, hide-core/src/coordination/started.rs, hide-core/src/agent_state/tally/scope.rs, hide-core/src/runtime/desk/parent.rs |
| Questions and a person's turn | hide-core/src/links/agent_asks.rs, hide-core/src/labels/context_label.rs, hide-core/src/runtime/tests/open_asks.rs, hide-core/src/runtime/tests/agent_asks.rs, hide-core/src/runtime/tests/human_turn.rs, web/src/components/folded-asks.tsx, web/src/missions.ts |
| The read axis, completion and a View to look at | hide-core/src/runtime/look.rs, hide-core/src/sidebar.rs, hided/src/demand.rs, web/src/windowScreen.ts, web/src/windowThread.ts, web/src/agentRow.ts, hide-core/src/runtime/tests/read_on_look.rs |
| A quiet row, where each axis comes from and the four groups | hide-core/src/agent_state/turn.rs, hide-core/src/agent_state/sessions.rs, hide-core/src/runtime/checks_wait.rs, hide-session/src/turns.rs, hide-session/src/turns/wake.rs, hide-core/src/agent_state/tally/lineage.rs |
| The mark, close protection and where a parent comes from | web/src/agentRow.ts, hide-core/src/coordination/lineage.rs, hide-core/src/agent_state/turn.rs, web/src/sidebarTree.ts, web/src/components/agent-tree-popover.tsx, hide-core/src/runtime/tests/tree_close.rs |
| The shared status contract and uninstrumented agents | web/src/components/status-mark.tsx, hide-core/src/agent_sleep.rs, hide-core/src/agent_sleep/dormant.rs, hide-core/src/pane_reopen.rs, web/src/paneConnectionRules.ts, web/src/errorNotice.ts |
| GitHub and GitLab status in a Workspace row | hide-core/src/github.rs, hide-host/src/gh.rs, hide-core/src/gitlab.rs, hide-node-link/src/glab.rs, hide-core/src/runtime/github_poll.rs, web/src/githubLook.ts, web/src/prMark.ts, hide-core/src/agent_state/work/board.rs |
| How rows are drawn and what reaches the phone | hide-core/src/agent_state/notice_table.rs, hided/src/desktop_notices.rs, hided/src/mobile/push.rs, hided/src/mobile/mod.rs, hide-core/src/agent_state/turn.rs |
Moved to Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps.
Moved to Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps.
Moved to Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps.
Moved to Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps.
Moved to Ownership: work Hide AI, a tool, a Hide Bot thread or a mission keeps.
Moved to Questions and a person's turn.
Moved to Questions and a person's turn.
Moved to Questions and a person's turn.
Moved to Questions and a person's turn.
Moved to Questions and a person's turn.
Moved to The read axis, completion and a View to look at.
Moved to The read axis, completion and a View to look at.
Moved to The read axis, completion and a View to look at.
Moved to The read axis, completion and a View to look at.
Moved to The read axis, completion and a View to look at.
Moved to A quiet row, where each axis comes from and the four groups.
Moved to A quiet row, where each axis comes from and the four groups.
Moved to A quiet row, where each axis comes from and the four groups.
Moved to A quiet row, where each axis comes from and the four groups.
Moved to The mark, close protection and where a parent comes from.
Moved to The mark, close protection and where a parent comes from.
Moved to The mark, close protection and where a parent comes from.
Moved to The mark, close protection and where a parent comes from.
Moved to The shared status contract and uninstrumented agents.
Moved to The shared status contract and uninstrumented agents.
Moved to The shared status contract and uninstrumented agents.
Moved to The shared status contract and uninstrumented agents.
Moved to The shared status contract and uninstrumented agents.
Moved to The shared status contract and uninstrumented agents.
Moved to The shared status contract and uninstrumented agents.
Moved to GitHub and GitLab status in a Workspace row.
Moved to GitHub and GitLab status in a Workspace row.
Moved to GitHub and GitLab status in a Workspace row.
Moved to GitHub and GitLab status in a Workspace row.
Moved to GitHub and GitLab status in a Workspace row.
Moved to GitHub and GitLab status in a Workspace row.
Moved to GitHub and GitLab status in a Workspace row.
Moved to How rows are drawn and what reaches the phone.
Moved to How rows are drawn and what reaches the phone.