fix(tui): improve subagent display and timer tracking#282
Merged
Conversation
Changes: - Force main agent and subagents to use TodoWrite tool for progress visibility - Show 'Delegation' status indicator when subagent is running - Use total time from last user prompt instead of per-task timer - Keep Task display visible after completion (cleared on next turn) - Add prompt_started_at tracking for consistent elapsed time display - Enable TodoWrite/TodoRead tools for subagents (only Task disabled) Fixes issues with: - Subagent todo list not visible in real-time - Loading indicator not shown during agent delegation - Timer resetting per task instead of showing total duration - Task label disappearing immediately after completion
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.
Summary
This PR fixes several issues with the TUI when subagents (Task tool) are running:
Changes
Todo list visibility: Main agent and subagents are now instructed to use TodoWrite tool for real-time progress visibility
Delegation indicator: Shows 'Delegation' status when a subagent is running instead of 'Working'
is_delegatingflag to StreamingStateTimer tracking: Shows total time from last user prompt instead of per-task timer
prompt_started_atthat persists across streaming restartsprompt_elapsed_seconds()for consistent elapsed time displayfull_reset()to clear timer only when entire conversation turn is completeTask visibility: Keeps Task display visible after completion (cleared on next conversation turn)
active_subagentson completionTesting