Skip to content

teams: the global manager is not woken by a top-level manager's turn ending - #2906

Closed
ZeroPoint95 wants to merge 9 commits into
zeropoint95/crew-delegationfrom
zeropoint95/crew-quiet-afi
Closed

ZeroPoint95 wants to merge 9 commits into
zeropoint95/crew-delegationfrom
zeropoint95/crew-quiet-afi

Conversation

@ZeroPoint95

@ZeroPoint95 ZeroPoint95 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Each crew manager is seated in All teams, whose manager is the global manager (Afi in the desktop app). Every turn a crew manager ended wrote finished there, and finished started the global manager's turn.

Measured on 2026-11-24 in the desktop app, with the person talking to two crew managers directly:

  • The global manager was woken 22 times in one afternoon: 803,496 input tokens (531,200 read from cache) and 333 output tokens. All 22 answers were [no change].
  • The day before, one such wake had it read a crew manager's conversation and send the person's own request back to that manager as a directive. The manager answered that the work was already handed out.
  • After ten wakes with no word from the person the loop breaker cut it off, so it was not doing useful work on a long unattended run either.

What changes

  • A top-level manager's turn ending (finished, and any stop) no longer starts the global manager's turn. One rule, teamEventWakesManagerOf, is used by the watch that wakes an open manager and by the path that opens a closed one.
  • The global manager is still woken by a top-level manager's post to it (team_post), its question or a permission it is held on, and its turn failing.
  • The global manager's role text says a manager's turn ending does not start its own, that team_status says where each stands, and that it must never send a manager the person's own request to that manager as a directive. Its delivery line no longer lists "finishing" among what starts its turn.
  • A top-level manager's role text says its turn ending does not start the global manager's turn, and to post what the global manager should act on or tell the person, and nothing the person already has from it.
  • Teams below the top are unchanged: a member finishing still wakes its own manager.

What this gives up

The global manager no longer hears of a crew's routine progress on its own. It learns of a result when the crew manager posts it, and of a blocker when the manager asks or fails. A summary on Afi's home of work a crew finished unattended now depends on that post.

Depends on

Stacked on #2897 (phases 1 and 2), which changed the same two places. This PR is against that branch and is to be retargeted to dev once #2897 merges.

Checks

  • New: TestTheGlobalManagerIsNotWokenByATopLevelManagersTurnEnding and TestTeamEventWakesTheGlobalManager in internal/session/team_nest_test.go.
  • go vet ./internal/session/, the team, wake, rouse, crew and nest tests of internal/session, internal/teams, make fmt-check test-laws manual-gates changelog-check: pass.
  • internal/tui3 run whole fails one test, TestTheSpendingTabIsTheSevenRowsAndNothingElse (an extra unbilled row). It fails the same way on the teams: hand-offs say what happened, pause and stop hold, one wake path, weak models are reported #2897 branch and passes when run alone on both, so it is not from this change.
  • Tried by hand in the built desktop app (4ea2a1238): a crew manager answered the person and its finished in All teams woke nobody (before, woke ◆ followed within six seconds). The manager then posted one line to the global manager with team_post: that woke it, it read the crew with team_status and team_read, and told the person the result on its own page. That one wake cost 130,687 input tokens over four calls, one of them a completion-check follow-up it answered [no change]; the cost of a wake is not changed here, only how many there are.
  • Not tried by hand: a top-level manager's question or failure waking the global manager (unchanged code paths, covered by the table test).

Final review

Three impartial review rounds, each by a fresh reviewer, with a repair round after each. No round found a blocker.

  • Round 1: the test that guarded the rule passed with the rule removed (it now waits past the wake's settle, and a second test covers a global manager nobody has open); team_send's answer told the global manager that endings wake it.
  • Round 2: a directive the global manager sends is answered with team_post, and its text, the top-level manager's text and the send answer say so.
  • Round 3: the rule is root-wide. No member's turn finishing or being stopped in All teams wakes or opens the global manager, because it can see and direct only the current top-level managers (a member left seated there after losing its team woke it on every answer). Failed and asking still wake it, and so does a post. A team it starts is told to answer its start brief with team_post.

What changes, as it now stands: teamEventWakesManagerOf(root, …); the earlier per-member rule (quietEnding, tops) is gone, and teamRole.top only chooses the role text.

Known limit: the rule is judged when an event is read. Nothing depends on that now that it is root-wide.

🤖 Generated with Claude Code

ZeroPoint95 and others added 3 commits November 24, 2026 21:11
…ending

Its members are the managers of whole teams, each a conversation the
person talks to, and every answer one of them gave ended a turn that
woke the global manager. Measured in the desktop app: 22 wakes in one
afternoon, 803,496 input tokens, all answered "[no change]"; one such
wake had it send the person's own request back to a manager as a
directive. It is still woken by a manager's post, question or failure,
and it is told never to re-issue the person's request.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…th a full stop

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ZeroPoint95 and others added 6 commits November 24, 2026 23:03
The rule now covers only members that manage a top-level team, not
everyone seated in the team that holds every team. team_send's answer no
longer tells the global manager that endings wake it. The test that
guarded the rule passed with the rule removed; it now waits past the
settle, and a second test covers a global manager nobody has open.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A directive the global manager sends is answered with team_post, and its
text, the top-level manager's text and the send answer all say so. A
member of the team that holds every team that manages nothing is told
what an ordinary member is told, since its ending does wake the global
manager. The closed-manager test now covers a failure opening it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t-afi

# Conflicts:
#	internal/manual/chat/team-manager.md
No member's turn finishing or being stopped in the team that holds every
team wakes or opens the global manager: it can see and direct only the
current top-level managers, so a member left seated there after losing
its team woke it on every answer for nothing. A team it starts is told
to answer the brief it was started on with team_post, as a directive.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@ZeroPoint95

Copy link
Copy Markdown
Collaborator Author

Folded into #2897 so the engine side of this work is one pull request. The commits are unchanged and are now on that branch; this branch is left in place.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant