Skip to content

feat: expose subagent tool activity as persistent CLI lines - #187

Closed
0xbyt4 wants to merge 1 commit into
NousResearch:mainfrom
0xbyt4:feat/expose-subagent-progress
Closed

feat: expose subagent tool activity as persistent CLI lines#187
0xbyt4 wants to merge 1 commit into
NousResearch:mainfrom
0xbyt4:feat/expose-subagent-progress

Conversation

@0xbyt4

@0xbyt4 0xbyt4 commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #169 -- subagent actions are now visible to the user during delegation.

Before: Subagent tool calls only updated the delegate spinner text, overwriting each other. The user saw only the last tool call and all child stdout was suppressed via redirect_stdout(devnull).

After: Each subagent tool call prints a persistent indented line below the spinner:

(o´▽`o) ⠋ 🔀 researching login bug
  ┊  ↳ [sub-1] terminal "find . -name '*.py'"
  ┊  ↳ [sub-1] read_file "src/auth/login.py"
  ┊  ↳ [sub-1] search_files "password validation"
  ┊ 📖 read      src/auth/login.py  0.3s
  ┊ 🔎 grep      password validation  1.2s
┊ 🔀 delegate  researching login bug  12.3s

Changes (single file: tools/delegate_tool.py)

  • _child_progress callback now prints persistent ┊ ↳ [sub-N] tool "preview" lines instead of updating the spinner text
  • Removed redirect_stdout(devnull) wrapper -- child runs with quiet_mode=True which already limits output to formatted tool lines
  • Removed sys.stdout/sys.stderr save/restore workaround (no longer needed without redirect)
  • Cleaned up unused imports (contextlib, io, sys)

Why this is safe

  • quiet_mode=True on child agents already suppresses raw model output -- only cute tool messages are printed
  • prompt_toolkit.patch_stdout (active in CLI) handles concurrent writes from background threads -- same pattern already used by batch mode completion lines (line 328)
  • Gateway progress forwarding (parent_progress_cb) is unchanged

Previously subagent tool calls only updated the delegate spinner text,
overwriting each other so the user only saw the last one. All child
stdout was suppressed via redirect_stdout(devnull).

Now each subagent tool call prints a persistent indented line:
  ┊  ↳ [sub-1] terminal "npm install"
  ┊  ↳ [sub-1] read_file "src/auth.py"

Child stdout is no longer suppressed (quiet_mode=True already limits
output to formatted tool lines). prompt_toolkit's patch_stdout handles
thread-safe rendering.

Closes NousResearch#169
@teknium1

teknium1 commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

Sorry I implemnented this one: #186

@teknium1 teknium1 closed this Mar 1, 2026
timbeaulac pushed a commit to timbeaulac/hermes-agent that referenced this pull request Jun 20, 2026
Refs revise-repeat/siva-os#187

Co-authored-by: siva-splicer[bot] <292605095+siva-splicer[bot]@users.noreply.github.com>
Generated-By: hermes/2.0 (role: Splicer; model: gpt-5.5)
Agent-Session: 20260620_030045_2e35e647
Task-Reference: NousResearch#187
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.

Feature Request: Expose subagent actions/thoughts to the user

2 participants