Skip to content

Practice skill: spawn one-shot workers unnamed; shut teammates down when their result is sealed - #1142

Open
seathatflowsinourveins wants to merge 3 commits into
mainfrom
claude/cc-native-practice-agent-teams-lifecycle-20261015
Open

seathatflowsinourveins wants to merge 3 commits into
mainfrom
claude/cc-native-practice-agent-teams-lifecycle-20261015

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

  • What this PR changes, in one or two sentences: the practice skill's workers rows (subagent-definitions, agent-teams) now state the agent lifecycle from the official docs at 2.1.300. One-shot workers spawn without a name and resume by agent id. A name is only for a worker that must message others. Each teammate is shut down once its result is sealed, because an idle teammate stays running and addressable.
  • Base commit: 0f4ee075b
  • Lane: lane:foundation
  • Owned paths touched:
    • .claude/skills/claude-native-practice/reference/slots.json and workers.md;
    • the slot manifest;
    • evidence/artifacts/agent-lifecycle-20261015/sources.json (new) and tests/test_native_practice_agent_lifecycle.py (new);
    • manifests/evidence.json.

Why: the command center found 48 idle evidence-reviewer teammates in its session (2026-10-15). Each was a one-shot micro spawned with a name, and the command center stopped them. The owner item of 2026-10-15, paraphrased by the command center, is to resolve the agent team's full lifecycle.

SOTA sources

Official Claude Code docs at client 2.1.300, fetched 2026-10-15T04:08:42Z. Each page's sha256 and the quoted lines are in sources.json.

  • agent-teams:
    • :60 and :430: while agent teams are enabled, a subagent that Claude names launches as a teammate, and Claude may name a subagent on its own.
    • :62: -p and Agent SDK sessions keep it a subagent.
    • :86 and :420: an idle teammate's row hides, but the teammate stays running and addressable.
    • :202-210: the lead ends a teammate with a shutdown request.
  • sub-agents :937-939: a name makes a subagent addressable. In an interactive session with teams on, a named spawn from the main conversation launches as a teammate, unless it is a fork or passes isolation on the call.
  • hooks :2853-2858: TeammateIdle with exit 2 keeps a teammate working, and {"continue": false, ...} stops it.
  • anthropics/claude-code CHANGELOG at 94506ff0, 2.1.178: with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, every session has one implicit team, and the Agent tool's name spawns a teammate.

Evidence-class table

Claim Evidence class Command / receipt
The docs lines say what the rows now state source_review sources.json (digests and quoted lines)
48 idle teammates in the command center's session, each a named one-shot micro native_proven (the command center's measurement) command center message, 2026-10-15T04:06Z
The rows, the page and the citations agree local_integration tests/test_native_practice_agent_lifecycle.py: failed before the change (10 failures, 1 error), passes after

Local commands run

$ python3 -m unittest tests.test_native_practice_agent_lifecycle    # before the change
FAILED (failures=10, errors=1)
$ python3 -m unittest tests.test_native_practice_*  (8 modules)
Ran 105 tests; OK (skipped=3)
$ python3 scripts/validate.py
rc 0; {"components": 71, "hashed_files": 12041, "profiles": 4, "receipts": 240, "status": "passed"}

Decision record

The slot rows are the record (dated notes on agent-teams). The host switch question (whether CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS stays on host-wide) is the owner's call. The measured case goes to the command center separately. A TeammateIdle hook design follows as a reviewed host diff.

Fix round 1 (c28c14b)

From GPT full1 at b4c4bba (full1-pr1142/GPT-VERDICT-b4c4bba3b.md), blocker 1 (P1). The command center released this commit at 2026-10-15T10:49Z.

Finding Fix Fail-first test (failed at b4c4bba, passes at c28c14b)
measurement.json committed a 16-hex prefix of the lead session's transcript, which is not committed The transcript object keeps its kind and line count only, and measurement.json is re-registered. No other copy of the prefix exists in the tree or the body. test_no_digest_commits_to_the_unpublished_transcript rejects any sha/digest key, or any value of 7 or more hex characters, in an object marked "not committed". It failed with 'sha' unexpectedly found in 'sha256_prefix'.

python3 -m unittest tests.test_native_practice_agent_lifecycle tests.test_published_digest_privacy tests.test_provenance_digest_custody: OK (1 skip). scripts/validate.py: rc 0. The earlier commit keeps the removed field in its history; no history rewrite.

Follow-ups

  • GPT P3: some detailed lifecycle citations and native observations remain partly unverified.
  • GPT P3: the text guard records, but does not enforce, shutting a teammate down once its result is sealed.
  • GPT P3: refresh the body's run receipts for the reviewed head.

Checklist

  • No GitHub Actions changed.
  • No workflows changed.
  • No secrets are printed, logged or committed.
  • No new paid hosting, subscription or billing surface.
  • Peer-owned untracked files and worktrees were preserved.

🤖 Generated with Claude Code

…hen sealed

The command center found 48 idle evidence-reviewer teammates in its session
(2026-10-15): each one-shot micro was spawned with a name, and with agent
teams on, a name launches a teammate that stays running and addressable
until it is shut down. The workers rows now state that lifecycle from the
official docs at client 2.1.300 (fetched 2026-10-15T04:08:42Z):

- subagent-definitions route: a one-shot worker (read, judge, builder)
  spawns without a name and is resumed by agent id; a name is for a worker
  others must message (sub-agents.md:937-939, agent-teams.md:60).
- agent-teams route and notes: name only a worker that must message others;
  shut each teammate down once its result is sealed (a shutdown request,
  agent-teams.md:202-210, or TaskStop); an idle teammate's row hides but
  it stays running and addressable (agent-teams.md:86, :420); a TeammateIdle
  hook can stop it with continue false (hooks.md:2853-2858); every session
  has one implicit team when the variable is set (CHANGELOG 2.1.178).
- evidence/artifacts/agent-lifecycle-20261015/sources.json: each page's
  sha256 and fetch time, and the cited lines quoted.
- The slot manifest lists the new route and evidence differences.

tests/test_native_practice_agent_lifecycle.py failed before the change (10
failures, 1 error) and passes; the native-practice modules run 105 OK.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Oct 15, 2026
…ateIdle measurement

- Owner direction, 2026-10-15 (paraphrased via the command center): teams
  stay on host-wide, following upstream practice, so they remain
  auto-invocable for tasks that suit them; one-shot workers spawn unnamed and
  teammates are shut down when sealed.
- Correction to this PR's first commit: the note said a TeammateIdle hook can
  stop a teammate at idle with continue false. Measured 2026-10-15 in a scratch
  interactive session (2.1.300): continue false ends the turn and the final
  answer still reaches the lead, but the teammate stays listed as idle and
  answers the next message; a shutdown request removes it from ListAgents.
  Source: hooks.md:2853-2858; evidence/artifacts/agent-lifecycle-20261015/
  measurement.json.
- New assertion in tests/test_native_practice_agent_lifecycle.py, failed
  before this commit; 106 native-practice tests OK; validate rc 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…fecycle measurement

GPT read of #1142 at b4c4bba (P1): measurement.json committed a 16-hex prefix of the lead
session's transcript, which is not committed. The transcript object now keeps only its kind and
line count, and a regression rejects any sha/digest key or 7+ hex value in an object marked
not committed. measurement.json re-registered in manifests/evidence.json.

Fail-before: test_no_digest_commits_to_the_unpublished_transcript, AssertionError: 'sha'
unexpectedly found in 'sha256_prefix'. After: 7 tests OK; validate rc 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant