Keep the status line on live work during team waits and between steps - #165
Open
Yushangjinghong2 wants to merge 3 commits into
Open
Yushangjinghong2 wants to merge 3 commits into
Yushangjinghong2 wants to merge 3 commits into
Conversation
…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>
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/.completedpair per cadence to the project event log. The team members write their own events under.argus/teams/<team>/life/.argus/life/role_activity.pygave 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.round.external_work_wait.started) keeps the Engineer active forEXTERNAL_WORK_WAIT_ACTIVE_WINDOW_S(16 minutes). The wait re-announces itself once per cadence, and the cadence is capped at 15 minutes inengineer/external_work.py. After that window the role decays as before, so a daemon that dies mid-wait does not look busy indefinitely.teammates workingforteam:work ids andbackground job runningotherwise. A finished wait (.completed) readschecking background workand keeps the ordinary 90-second activity window.Tests:
tests/cli/test_roles_status.pyadds 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,
currentWorkStatusinfrontend/web/src/lib/workStatus.tsreturned "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.tsadds 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 --noEmitpasses 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.*,reflectionand 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.pyadds 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