team next

Claims one record from the file the team file names, and holds it with a lease in this clone. The answer is the context line, the record's block, and one closing summary line. A seat cannot pull until team up has recorded its pane; the owner is refused, and so is a name that is not a seat. The source is a file the owner committed, or a tracker the owner's broker reads — with no broker running, next refuses and claims nothing.

Synopsis

team next [--mine | --release] [--wait] [--json]

Flags

FlagValueEffect
--mine—a new take keeps only records whose assignee is the caller's seat name; a renewal is not filtered
--release—unlink the caller's lease and print team next: released <id>; records no progress
--wait—re-reads the source every tasks.cadence while a pass finds nothing takeable, until a record is taken, the wait is stopped, or a read breaks; without tasks.cadence it refuses; off unless set
--json—one team.next document on stdout instead of the context line and block; off unless set
--help, -h—the usage, and exit 0

--mine and --release together are refused, and no file is written. --wait and --release together are refused the same way, and so is --wait without tasks.cadence in the team file: the pace is always the team's own declared one. --wait and --json together are refused too — a wait prints its events as they happen, which is not one document — and that refusal is plain stderr with the usage, never a document.

Who may run it

CallerMay
a declared seat of this team, on the pane the state records for that seatpull; any declared seat, not only the orchestrator
the owner, or a name that is not a seatnothing: team next: only a seat of this team pulls a task; this call is <caller>

A team that has never been started has no recorded pane, so a seat cannot pull until team up has recorded one.

Output and exit codes

OutcomeWhat is printedExit
a record was claimed, or the caller's live lease was renewedthe context line, the record's block (the team issues block, one record), and team next: claimed <id>0
a lease was released, or there was nothing to take or to releasethe context line and team next: released <id>, or team next: nothing is takeable / team next: nothing is assigned to you / team next: nothing is held0
the wait ended on a stop signal, or a clock that did not advanceteam next: stopped waiting0
refused: not a seat on its recorded pane, the team file can't be read or its policy is refused, the task file is missing or not a list, nothing was taken and a record is not a task, or the broker path refusedteam next: <reason>; under --json, a team.error document on stdout with id the contract row and repair the way out1
the invocation can't be read, or this folder is not a git checkoutteam next: <problem>, with the usage for the invocation; under --json, a team.error document2

Under --json the command prints one team.next document: its schema tag first, then format, dry_run (false), status (the outcome word), action (claim, release, or none), action_summary (the same closing line the plain run prints), project, session, and task — the claimed record's id and title, or null. A claimed record prints its block only in the plain run; the document carries its id and title.

Example

.agents/team.yaml
format: 1
project: beacon
coordinator: claude-keeper
operator: claude-keeper

trust:
  - ~/.config/team/lobby
  - ~/Code/beacon

workspace:
  mode: shared

tasks:
  source: file
  path: .agents/tasks.yaml

seats:
  - role: coordinator
    name: claude-keeper
    label: coordinator
    cli: claude-code
    vendor: anthropic
    model: Claude Opus
    version: "5.5"
    launch: claude --model claude-opus-5-5
.agents/tasks.yaml
- id: m1
  title: the task title
Terminal
 team next ; echo "exit $?"
team beacon, session "beacon"
m1  the task title
team next: claimed m1
exit 0