Skip to content

Keep the status line on live work during team waits and between steps - #165

Open
Yushangjinghong2 wants to merge 3 commits into
devfrom
fix/team-wait-role-activity-20260923
Open

Yushangjinghong2 wants to merge 3 commits into
devfrom
fix/team-wait-role-activity-20260923

Conversation

@Yushangjinghong2

@Yushangjinghong2 Yushangjinghong2 commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

When the Engineer hands the current step to a runtime team (for example the research idea pipeline) or to a background job, the round loop stops calling the model and only writes one round.external_work_wait.started / .completed pair per cadence to the project event log. The team members write their own events under .argus/teams/<team>/life/. argus/life/role_activity.py gave these wait events no role, so all four roles read as idle. The Web status line (currentWorkStatus) then fell back to "Waiting for the next step" while teammates were actively writing and checking routes. We saw this on a live research project: route 1 was written and checked and route 2 was being drafted, yet the page said it was waiting.

Behavior change:

  • round.external_work_wait.* events now belong to the Engineer.
  • An open wait (the Engineer's latest event is round.external_work_wait.started) keeps the Engineer active for EXTERNAL_WORK_WAIT_ACTIVE_WINDOW_S (16 minutes). The wait re-announces itself once per cadence, and the cadence is capped at 15 minutes in engineer/external_work.py. After that window the role decays as before, so a daemon that dies mid-wait does not look busy indefinitely.
  • Labels: teammates working for team: work ids and background job running otherwise. A finished wait (.completed) reads checking background work and keeps the ordinary 90-second activity window.
  • The daemon's running-stall watchdog also consults role activity. During an open wait the executor thread is alive and waiting, so the only effect there is a detection delay of at most one cadence if that thread dies mid-wait.

Tests: tests/cli/test_roles_status.py adds three cases: a team wait stays active across a cadence tick, a background job wait is labelled and expires after one window, and a finished wait uses the ordinary window. The first two fail on the previous code. Locally, the role-status tests (45), plus the daemon life-worker, supervision runtime, team wait, external-wait, background subagent, mission outcome, backend failure circuit and webapi suites, passed: 1607 passed, 8 skipped. Ruff passes on the changed files. No documentation or configuration changes.

Second case, same symptom: after a step finished, currentWorkStatus in frontend/web/src/lib/workStatus.ts returned "Waiting for the next step" before looking at live roles. So while the Planner was choosing the next step (about 40–90 seconds between steps on the same project), the status line still said waiting. A finished step with a live Planner and a running daemon now reads "Planning the next step" (正在规划下一步). No other role counts there, because post-step housekeeping such as reflection is attributed to the Engineer and is not a new step.

Web tests: frontend/web/src/test/workStatus.test.ts adds a case covering a live Planner after a finished step, a live Engineer after a finished step (still waiting), and a stopped daemon. The case fails on the previous code. tsc --noEmit passes and the full web suite passes (141 files, 1522 tests).

Third case: calls without a role label were attributed to the Engineer by default. The Web map summary (map-summary) runs at any time, so a finished map summary became the Engineer's latest event (working done) and hid the Engineer's own open call. We saw this on the live project: the Engineer's model call was open and running a slow shell command, yet the status line said waiting. map-summary, curator.*, reflection and the learning reviews (answer-learning, self-learning-review, team-learning-review) now belong to no role, following the existing treatment of library compaction.

Tests for this case: tests/cli/test_roles_status.py adds a map summary finishing during an open Engineer call, plus a parametrized check that each background label leaves the Engineer inactive. All six fail on the previous code. Related Python suites (tests/cli, tests/life, tests/webapi, daemon life worker, supervision runtime, team wait, external wait review): 3070 passed, 8 skipped.

🤖 Generated with Claude Code

lbx154 and others added 2 commits September 23, 2026 20:19
…the step

When the Engineer hands the current step to a runtime team or a background
job, its own event log only records one round.external_work_wait pair per
cadence. Role activity ignored those events, so every role read as idle and
the Web status line fell back to "Waiting for the next step" while teammates
were writing routes.

An open wait now counts as Engineer work for one cadence plus a margin (the
cadence caps at 15 minutes), labelled "teammates working" for teams and
"background job running" otherwise. A finished wait keeps the ordinary
activity window.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
After a step finished, currentWorkStatus returned "Waiting for the next step"
before looking at live roles, so the status line kept saying it was waiting
while the Planner was actively choosing the next step. A finished step with
a live Planner and a running daemon now reads "Planning the next step". Other
roles are not counted there: post-step housekeeping such as reflection is
attributed to the Engineer and is not a new step.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Yushangjinghong2 Yushangjinghong2 changed the title Keep the Engineer active while a team or background job carries the step Keep the status line on live work during team waits and between steps Sep 24, 2026
Calls without a role label were attributed to the Engineer. The Web map
summary runs at any time, so a finished map summary became the Engineer's
latest event and hid its own open call: during a long shell command the
status line fell back to "Waiting for the next step". Map summaries, curator
distillation, reflection and learning reviews now belong to no role, like
library compaction already did.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants