feat(workflows): display workflow agent cohort in statusline#68
Draft
tmck-code wants to merge 3 commits into
Draft
feat(workflows): display workflow agent cohort in statusline#68tmck-code wants to merge 3 commits into
tmck-code wants to merge 3 commits into
Conversation
Add workflow cohort tracking and rendering so active workflow subagents appear in the statusline alongside regular subagent activity. - yas/info/workflows.py: gather live workflow agents from the filesystem - renderer/layout/subagents: render the workflow cohort row - ops/demo.py: demo coverage for the new row - openspec/changes/display-workflow-agents: proposal, design, spec, tasks - test/test_workflow_cohort.py: cohort tests Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # claude/yas/info/subagents.py # claude/yas/layout.py
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.
Context
The Workflow tool runs multi-agent orchestrations whose subagents are invisible to the statusline. yas globs
subagents/*.meta.json, but workflow agents live a directory deeper (subagents/workflows/<runId>/) and theirmeta.jsoncarries only{"agentType":"workflow-subagent"}— no description, no per-agent type. A user running a workflow sees nothing, even while several agents are actively burning tokens. This change surfaces those agents, grouped by their workflow run, so the statusline reflects what is actually executing.Spec:
openspec/changes/display-workflow-agents/(newworkflow-cohortcapability).Changes
claude/yas/info/workflows.py, new): globsubagents/workflows/<runId>/dirs under the session — a dir exists the instant an agent starts. Opportunistically read the session-levelworkflows/<runId>.jsonto enrich a run withworkflowName, current phase, and theagentId → labelmap; fall back to the transcript's first prompt line and therunIdwhen JSON is absent/stale, so detection never depends on JSON liveness._parse_transcriptfor tokens, activity snippet, and Done detection (end_ts > 0) — no new per-agent reader.renderer.py,layout.py,constants.py): each live run renders as a distinct grouped block after the subagent cohort and task row — header (▸ <name> [<phase>]), per-agent rows reusingsubagent_row, summary footer (└ N agents · M done · <tok>). Width <80 collapses to header+summary; per-run rows cap at 6 (overflow → summary); at most 2 workflow blocks render concurrently.SessionViewgains a@cached_propertyconstructingRunningWorkflows.from_session(...)(info/__init__.py).CONTEXT.mdglossary gains the workflow-run terms;ops/demo.pygains demo coverage;test/test_workflow_cohort.py(new, 22 tests) covers detection, label fallback, liveness/retirement, narrow collapse, and the agent/run caps.Checklist
Screenshots / recording
Benchmark
mainPRSystem info
🤖 Generated with Claude Code