How a team works
A team's members share three things through the team's tools: messages, each member's brief and tasks, and the team's goals. Everything lives in memory on your computer and is gone when the team's last member leaves, so the leader keeps the lasting record in your project's own files. The handbook every member reads says how to work in a team; this page says what it holds.
Joining is required. A member's first team call is team_join, and every other tool answers join_first until it has run, with a sentence saying how to join; team_guide alone answers before, with the start of the handbook. The join gives:
| Field | Required | What it is |
|---|---|---|
role | Yes | One of the working roles: coordinator, builder, reviewer, tester or researcher. leader is refused here: the leader role is only claimed |
description | Yes | One line on what the member works on, 1 to 160 characters; it is the member's first brief |
name | No | The member's own choice, kept when no member holds it, refused with name_taken otherwise |
assign_if_taken | No | With a taken name, take the next name of the list instead of a refusal |
parent | No | The name of the member that started this one, for a sub-agent that joins |
- Field
role- Required
- Yes
- What it is
- One of the working roles:
coordinator,builder,reviewer,testerorresearcher.leaderis refused here: the leader role is only claimed
- Field
description- Required
- Yes
- What it is
- One line on what the member works on, 1 to 160 characters; it is the member's first brief
- Field
name- Required
- No
- What it is
- The member's own choice, kept when no member holds it, refused with
name_takenotherwise
- Field
assign_if_taken- Required
- No
- What it is
- With a taken
name, take the next name of the list instead of a refusal
- Field
parent- Required
- No
- What it is
- The name of the member that started this one, for a sub-agent that joins
A member hi started shows as the agent hi launched, at the version hi measured, rather than as its MCP client names itself: DeepSeek Harness 0.2.2-rc.5, for example, whose client calls itself dsh-mcp-client 0.0.1. A member you started yourself shows as its client names itself. Its model comes from hi where hi started it, and a member never types any of them. A member keeps its name, color, role, brief and tasks when its session reconnects, and one agent is one member.
A name is 1 to 32 letters, digits and hyphens, starting with a letter or a digit. It is compared without regard to case, addressed in lower case (paul) and shown with a capital first letter (Paul), and it can carry no markup, quote or sentence into another agent's context. A few names are kept for the team itself, such as all, person, hi and you. --as <name> fixes a member's name before it joins, and a join that names another is refused with name_fixed.
A member that gives no name, or a taken one with assign_if_taken, is given the next of hi's 100 first names, in this order: Paul, John, Anna, Ben, Carl, Dana, Emma, Fred, Gina, Hugo, Iris, Jack, Kate, Leo, Mia, Nora, Owen, Rosa, Sam, Tina, Vera, Wade, Zoe, Adam, Alex, Amy, Arlo, Ava, Beth, Theo, Bob, Brad, Cleo, Cody, Dave, Dean, Dora, Drew, Ella, Eric, Evan, Faye, Finn, Gail, Gary, Gene, Glen, Greg, Gus, Hal, Hank, Hazel, Ian, Ida, Ivan, Ivy, Jade, Jill, Joan, Judy, Clara, Kevin, Kim, Kurt, Lara, Lily, Lisa, Lou, Lucy, Luke, Milo, Ezra, Meg, Mike, Mona, Nate, Neil, Nina, Noah, Omar, Otis, Pete, Phil, Ray, Rita, Stan, Ruth, Ryan, Sean, Seth, Tara, Ted, Toby, Tom, Troy, Walt, Wes, Lena, Abby, Quinn. No two start with the same three letters, so no two look alike. A name is given only once while the team runs, so a freed name is not handed to a newcomer while messages may still name its earlier holder; once all 100 have been used, the first not held now; with all 100 held at once, a name and a number, such as paul-2.
Each member wears a color of its own while it is connected, shown in hi team's views and on its messages, and returned by the tools as data, so an agent can mention it. A member takes the first color no connected member of its team wears, and keeps it when its session reconnects. Each color stands at least 3:1 against the Console's dark navy and against white, and has a 256-color fallback for terminals without truecolor:
Twelve colors, so a team holds at most 12 members
| Color | Its tone | 256-color fallback |
|---|---|---|
| Blue | #0089DD | 32 |
| Teal | #198C89 | 30 |
| Violet | #9365E4 | 98 |
| Orange | #C96116 | 166 |
| Pink | #DC3BA1 | 169 |
| Indigo | #7470E6 | 62 |
| Gold | #838317 | 100 |
| Magenta | #D928D3 | 164 |
| Azure | #4F7BE0 | 68 |
| Sea | #1E906A | 29 |
| Purple | #B254DB | 134 |
| Slate | #6B809D | 67 |
- Color
- Blue
- Its tone
#0089DD- 256-color fallback
- 32
- Color
- Teal
- Its tone
#198C89- 256-color fallback
- 30
- Color
- Violet
- Its tone
#9365E4- 256-color fallback
- 98
- Color
- Orange
- Its tone
#C96116- 256-color fallback
- 166
- Color
- Pink
- Its tone
#DC3BA1- 256-color fallback
- 169
- Color
- Indigo
- Its tone
#7470E6- 256-color fallback
- 62
- Color
- Gold
- Its tone
#838317- 256-color fallback
- 100
- Color
- Magenta
- Its tone
#D928D3- 256-color fallback
- 164
- Color
- Azure
- Its tone
#4F7BE0- 256-color fallback
- 68
- Color
- Sea
- Its tone
#1E906A- 256-color fallback
- 29
- Color
- Purple
- Its tone
#B254DB- 256-color fallback
- 134
- Color
- Slate
- Its tone
#6B809D- 256-color fallback
- 67
A color is never the only signal: the member's name is always shown beside it, and with NO_COLOR set, or output that is not a terminal, there is no color at all.
Every member has a role: leader, coordinator, builder, reviewer, tester or researcher. A role tells the agent its part. It grants no permission: each agent keeps its own.
| Role | What it does | How many |
|---|---|---|
leader | Takes your instructions, decides and directs the team: organizes the work, keeps the team's to-do list, tracks every member's tasks and the team's goals, and assigns work. It does no coding or building itself and hands every piece of work to a member, a small fix included. It orchestrates the team | Exactly one, claimed |
coordinator | Breaks the work into tasks, assigns and tracks them, and reports progress to the leader; it orchestrates the tasks it was given | Any |
builder | Does the work it is given (code, changes, tests), keeps its own tasks' state current, and may run sub-agents of its own | Any |
reviewer | Reviews builders' work when asked, and reports its findings to whoever asked and to the leader | Any |
tester | Runs and writes tests and proves changes, reporting each result with its evidence | Any |
researcher | Reads code, docs and the web, and reports findings with their sources | Any |
- Role
leader- What it does
- Takes your instructions, decides and directs the team: organizes the work, keeps the team's to-do list, tracks every member's tasks and the team's goals, and assigns work. It does no coding or building itself and hands every piece of work to a member, a small fix included. It orchestrates the team
- How many
- Exactly one, claimed
- Role
coordinator- What it does
- Breaks the work into tasks, assigns and tracks them, and reports progress to the leader; it orchestrates the tasks it was given
- How many
- Any
- Role
builder- What it does
- Does the work it is given (code, changes, tests), keeps its own tasks' state current, and may run sub-agents of its own
- How many
- Any
- Role
reviewer- What it does
- Reviews builders' work when asked, and reports its findings to whoever asked and to the leader
- How many
- Any
- Role
tester- What it does
- Runs and writes tests and proves changes, reporting each result with its evidence
- How many
- Any
- Role
researcher- What it does
- Reads code, docs and the web, and reports findings with their sources
- How many
- Any
A member may change its own role among the working roles with team_update, never to leader, and every member is told. Each member's role shows beside its name and color in team_members, team_tasks and hi team.
One member leads, and you choose which. Tell an agent that it leads, and it claims the role, quoting your instruction, which everyone sees. The leader stays until you choose another, with your instruction again or with hi team lead <name>. The leader organizes: it keeps the goals and the to-do list, assigns work and checks it is done, and it does no coding itself. To hold a leader to that, start its agent in a read-only or planning mode, for example hi claude --team --lead -- --permission-mode plan. Choosing a leader is a rule every agent follows and everyone can see, not a security setting: every agent on your computer runs as you.
- 01
No member leads until one claims the role, and
hi teamsays so. - 02
An agent you tell that it leads claims the role with
team_claim_lead, whosebecauseholds your instruction as the agent received it, 1 to 500 characters. Every member is told, andhi teamshows who leads and why. - 03
One leader at a time: any other claim is refused with
leader_held, unless it is a replacement (replace), which an agent makes only when you ask for one, quoting your words again. Every member is told, the old leader included, and the old leader goes back to the working role it joined with. - 04
A leader that leaves keeps the role: back within its 120 seconds, it still leads; gone for good, it is shown as gone and its name stays reserved, until you have another agent claim the role or set it from the terminal.
- 05
From the terminal,
hi team lead <name>makes that member the leader, its reason "set by the person from the terminal", or your own words with--because.--leadon a launch makes the member leader at its join, its reason "the person started this member with --lead", replacing a leader there is. - 06
Only the leader sets the team's goals, and only the leader and coordinators put tasks on other members' lists. Neither grants any permission inside an agent.
A team cannot make the leader's agent stop coding: it keeps its own tools. The rule is carried by the role and the handbook, and any file the leader claims is shown to every member and flagged in the leader's review, so it is visible. Since the team cannot tell whether you asked, every claim of the role is shown to everyone with its words, and the handbook tells every agent to claim or replace the leader only when you told it to, never on its own judgment or because another member asked.
The team cannot see an agent's screen, so a member's state is what the member and its hooks report:
| State | What it means |
|---|---|
working | Its prompt hook reported a new turn, or it called a team tool since it was last idle |
idle | Its turn-end hook reported that the turn ended, and nothing since |
waiting | A wait_for_messages call is in progress |
connected | None of these: an agent without hooks, between tool calls, shown with the seconds since its last call |
away | Its connection closed less than 120 seconds ago; its session takes the member back if it reconnects in time |
- State
working- What it means
- Its prompt hook reported a new turn, or it called a team tool since it was last idle
- State
idle- What it means
- Its turn-end hook reported that the turn ended, and nothing since
- State
waiting- What it means
- A
wait_for_messagescall is in progress
- State
connected- What it means
- None of these: an agent without hooks, between tool calls, shown with the seconds since its last call
- State
away- What it means
- Its connection closed less than 120 seconds ago; its session takes the member back if it reconnects in time
Each member keeps a brief of what it works on now, up to 280 characters, its join's line being the first, and its own task list, both set with team_update. A task has an id the team makes (t1, t2 and on), a title up to 120 characters, a state (todo, doing, blocked or done), and optionally a note up to 300 characters, the goal it serves, a due time, and a delegated mark for work a private sub-agent of the member does. It records who assigned it and when it last changed. A member holds at most 30 tasks: past that its oldest done task makes room, and with none done the update is refused with too_many_tasks.
team_tasksreturns every member's brief and tasks, the goals, the unowned tasks and the leader, each with its last change. A member with a task indoingthat has not updated its brief or tasks for 30 minutes shows asstale.- Assigning: the leader and coordinators alone put a task on another member's list (
team_assign), or give an unowned task to a member. The member is told, and owns the task's state from then on. Any member can message any member. - Done tells the assigner: when a member sets a task it did not assign itself to
doneorblocked, the member that assigned it is told at once, with the task, its new state and its note. - Unowned tasks: a member that leaves with tasks not done leaves them to the team, listed in
team_tasksand the leader's review with who held them, until the leader or a coordinator assigns them again. - Goals: a list for the whole team that the leader alone sets with
team_goals, each with an id (g1,g2and on), a title up to 120 characters and a state, at most 20. Every member reads them withteam_tasks,hi teamshows them, and a task may name the goal it serves.
A member sends a message with send_message to a member by name, to all or to person, which is you. The team numbers a team's messages in the order it takes them, and each inbox gives them in that order, so what one member sends another arrives in the order sent. A message stays in its inbox until the member's team server has written it into a tool result for its agent: if the server ends or the call is cancelled first, the message waits for the next read.
| Field | What it is |
|---|---|
id | A number counting up from 1 in each team while it runs |
from | The sender's name, set by the team from the sender's own connection, never by the sender; hi for the team's own notices; person for you |
from_display, from_color | The sender's name as shown, and its color |
to | A member's name, all, or person |
kind | message, question (to you), answer (from you, to a question) or notice (from hi) |
text | 1 to 32,768 bytes of UTF-8, kept exactly as sent |
sent_at | The team's clock in UTC, RFC 3339 with milliseconds |
reply_to | Optional: the id of the message this one answers |
- Field
id- What it is
- A number counting up from 1 in each team while it runs
- Field
from- What it is
- The sender's name, set by the team from the sender's own connection, never by the sender;
hifor the team's own notices;personfor you
- Field
from_display,from_color- What it is
- The sender's name as shown, and its color
- Field
to- What it is
- A member's name,
all, orperson
- Field
kind- What it is
message,question(to you),answer(from you, to a question) ornotice(fromhi)
- Field
text- What it is
- 1 to 32,768 bytes of UTF-8, kept exactly as sent
- Field
sent_at- What it is
- The team's clock in UTC, RFC 3339 with milliseconds
- Field
reply_to- What it is
- Optional: the id of the message this one answers
A message to all puts one copy, under one id, in the inbox of every other member present, away members included, and the answer lists whom it was queued for and who refused it. The team keeps no read receipts: team_members shows each member's unread count. Notices from hi tell members when a leader is claimed, a role changes, a task is assigned or finished, a claim overlaps, or a member goes silent or leaves. Team has the limits.
When only you can decide something, a member asks you. The live view highlights the question until you answer it with hi team send <name> --answer <id> "...", and your answer goes back to the member who asked.
A question is a message to person with question set. The team keeps your questions whether or not a live view runs: a bare hi team counts them, and the leader's review lists them for the leader. Your answer reaches the member as a message of kind answer replying to the question, which is then closed, and the leader is told. A message to person without question shows in the live view and is not highlighted.
A member says where it works with team_claim_paths: folders and files, absolute or relative to its own folder, and branches as branch:<name>, at most 50 claims. Two claims overlap when one path is or holds the other, compared without regard to case on macOS and Windows, or when they name the same branch. An overlapping claim is recorded, never refused: both members and the leader are told at once, with both claims, and the claimant's result lists the overlaps. A claim is freed when its member releases it or leaves.
A team lock is a named lock that one member holds at a time, such as push-main, release or migration, taken before a step that must not run twice at once. With team_lock, take answers at once, with the lock or lock_held naming its holder and since when; wait waits for it within the bounds of a wait and takes it when it frees, waiters served in the order they asked; release frees it. A lock frees itself when its holder leaves, and hi team shows every lock with its holder, its reason and since when. A team lock binds only the members that use it, and is no lock in the operating system or the repository, so the handbook tells every member to take it every time.
The team notes each member's last activity, a tool call or a hook's report. It tells the leader when a member with a task in doing has been silent for 20 minutes, once per silence, and when a member left mid-task, naming its unfinished tasks, now unowned. With no leader, the alert goes to whoever assigned the task, else to you.
team_review, for the leader alone, returns in one call everything that needs attention, each item with its member, its task or lock, and its age: members silent past the bound with work in doing, members away or gone with unfinished tasks, unowned tasks, blocked tasks, tasks past their due time, briefs gone stale, your open questions, overlapping claims, the leader's own claims, locks held past 30 minutes, and messages unread for over 10 minutes. The handbook tells the leader to run it at the start of every turn, after every batch of messages, after any restart or compaction, and at least every 15 minutes while a task is in doing.
Orchestrating is not a role: the leader orchestrates the team, a coordinator the tasks it was given, and any member, a builder included, may start sub-agents of its own. A sub-agent need not join, and by default it does not: it reaches the team only through the member that started it, which answers for its work, reports it in its own brief and tasks, and may mark a task delegated, so the leader sees all the work under one member. A sub-agent that has the team's server may join like any member, with a name, a role (the leader role only as the leader rule allows), a line on its work and the same duties, naming its starter in parent. team_members, team_tasks and hi team show who works under whom, and a parent that leaves does not remove its sub-agents.
The handbook is one text, part of hi and written for any project, that every member reads at its join and again with team_guide after its context was summarized or compacted (Join a team has where each agent finds it). hi team skill prints it whole. Its sections:
| Section | For | What it says |
|---|---|---|
start | Every member | What a team is; the rule of trust; every member's duties (keep the brief and tasks current, report with evidence, claim files before changing them, take the team lock before a step that must not run twice, answer messages, ask you what only you can decide, never put a secret in a message); waiting; the leader; sub-agents; what to do after a restart or a compaction |
roles | Every member | The six roles and their duties |
leader | The leader | Organizing the goals, the to-do list and the members' work; keeping the lasting record in the project's own notes; writing briefs; assigning and tracking; rulings; messages that arrive late; the review; evidence before done; one at a time through team locks; reporting to you; documentation; running the procedures |
merge | The leader, with members reading | The merge procedure: when it ends, every piece of work in the repositories in scope is landed, held on purpose, stranded or unsure, each with evidence, and you have answered every question only you can answer. It never loses work: no forced resets, cleans or deletions |
todo-recap | The leader, with members reading | The to-do recap: one living to-do file that lists only work still to do, each item citing the document that asks for it and the evidence that the code lacks it; only the leader writes it |
- Section
start- For
- Every member
- What it says
- What a team is; the rule of trust; every member's duties (keep the brief and tasks current, report with evidence, claim files before changing them, take the team lock before a step that must not run twice, answer messages, ask you what only you can decide, never put a secret in a message); waiting; the leader; sub-agents; what to do after a restart or a compaction
- Section
roles- For
- Every member
- What it says
- The six roles and their duties
- Section
leader- For
- The leader
- What it says
- Organizing the goals, the to-do list and the members' work; keeping the lasting record in the project's own notes; writing briefs; assigning and tracking; rulings; messages that arrive late; the review; evidence before done; one at a time through team locks; reporting to you; documentation; running the procedures
- Section
merge- For
- The leader, with members reading
- What it says
- The merge procedure: when it ends, every piece of work in the repositories in scope is landed, held on purpose, stranded or unsure, each with evidence, and you have answered every question only you can answer. It never loses work: no forced resets, cleans or deletions
- Section
todo-recap- For
- The leader, with members reading
- What it says
- The to-do recap: one living to-do file that lists only work still to do, each item citing the document that asks for it and the evidence that the code lacks it; only the leader writes it
mine gives a member the start and its own role, with the leader's handbook for the leader, and all gives everything. The leader runs the merge procedure before a release and at the end of a working session, and the to-do recap after a large landing or when you ask, giving the reading to members and keeping the deciding and the report for itself.
If the team's process ends while members are connected, after a crash for example, each member's next tool call starts it again and joins it again under the same name, role and parent, a leader keeping its role. Messages, briefs, tasks, goals, claims and locks are gone, and each member is told once (team_restarted), so it sets its brief, tasks, claims and locks again.
Every team tool answers with structured data and the same JSON as text, and a failure is a result the model reads, with its code and a sentence. The tools that only read are marked read-only, and none is marked as destructive or as reaching outside the team.
| Tool | Who | What it does |
|---|---|---|
team_join | Any member, once, first | Joins with a role, a line on its work and, optionally, a name, assign_if_taken and a parent; returns the member's name, color and role, the leader, the members, the goals and the handbook |
team_guide | Any, before the join too | The handbook, by section |
team_members | Any | Every member: name, color, role, whether it leads, parent, brief, agent and version, model, folder, whether hi or you started it, state, how it wakes, seconds since active, unread messages and when it joined |
team_tasks | Any | Every member's brief and tasks, or one member's, with the goals, the unowned tasks and the leader |
team_update | Any member, on its own | Sets its brief, its working role and its tasks: a task with an id is updated, one without is added, and remove drops tasks |
team_assign | The leader and coordinators | Puts a task on another member's list, or gives an unowned task to a member |
team_goals | The leader | Sets the team's goals |
team_claim_lead | Any member, on your word | Claims the leader role, because quoting your instruction; replace takes the role from the leader there is |
team_claim_paths | Any | Claims or releases folders, files and branches, and lists every overlap |
team_lock | Any | Takes, waits for or releases a team lock (take, wait, release), with a reason |
team_review | The leader | Everything that needs attention, in one call |
send_message | Any | Sends to a member, all or person; question marks a question for you, reply_to the message it answers |
read_messages | Any | Up to 20 messages from its inbox, more saying that more wait |
wait_for_messages | Any | Waits for a message up to its limit and answers as read_messages, or with timed_out when none came |
- Tool
team_join- Who
- Any member, once, first
- What it does
- Joins with a role, a line on its work and, optionally, a name,
assign_if_takenand aparent; returns the member's name, color and role, the leader, the members, the goals and the handbook
- Tool
team_guide- Who
- Any, before the join too
- What it does
- The handbook, by section
- Tool
team_members- Who
- Any
- What it does
- Every member: name, color, role, whether it leads, parent, brief, agent and version, model, folder, whether
hior you started it, state, how it wakes, seconds since active, unread messages and when it joined
- Tool
team_tasks- Who
- Any
- What it does
- Every member's brief and tasks, or one member's, with the goals, the unowned tasks and the leader
- Tool
team_update- Who
- Any member, on its own
- What it does
- Sets its brief, its working role and its tasks: a task with an
idis updated, one without is added, andremovedrops tasks
- Tool
team_assign- Who
- The leader and coordinators
- What it does
- Puts a task on another member's list, or gives an unowned task to a member
- Tool
team_goals- Who
- The leader
- What it does
- Sets the team's goals
- Tool
team_claim_lead- Who
- Any member, on your word
- What it does
- Claims the leader role,
becausequoting your instruction;replacetakes the role from the leader there is
- Tool
team_claim_paths- Who
- Any
- What it does
- Claims or releases folders, files and branches, and lists every overlap
- Tool
team_lock- Who
- Any
- What it does
- Takes, waits for or releases a team lock (
take,wait,release), with a reason
- Tool
team_review- Who
- The leader
- What it does
- Everything that needs attention, in one call
- Tool
send_message- Who
- Any
- What it does
- Sends to a member,
allorperson;questionmarks a question for you,reply_tothe message it answers
- Tool
read_messages- Who
- Any
- What it does
- Up to 20 messages from its inbox,
moresaying that more wait
- Tool
wait_for_messages- Who
- Any
- What it does
- Waits for a message up to its limit and answers as
read_messages, or withtimed_outwhen none came
A tool called by a role it is not for answers not_allowed, and a message or an assignment to oneself to_self.
Related sheets
- Sheet
- 12 of 21
- Detail
- G
- Updated
- 2026-11-20