Skip to content

fix: keep ACP stdout protocol-clean#3909

Closed
Git-on-my-level wants to merge 2 commits into
NousResearch:mainfrom
Git-on-my-level:fix/acp-stdout-clean-upstream
Closed

fix: keep ACP stdout protocol-clean#3909
Git-on-my-level wants to merge 2 commits into
NousResearch:mainfrom
Git-on-my-level:fix/acp-stdout-clean-upstream

Conversation

@Git-on-my-level

Copy link
Copy Markdown
Contributor

Summary

  • route ACP AIAgent incidental human-readable output to stderr instead of stdout
  • keep ACP stdio transport stdout reserved for JSON-RPC frames only
  • add a regression test that asserts ACP agent print output bypasses stdout

Test Plan

  • source venv/bin/activate && python -m pytest tests/acp/test_session.py -q
  • source venv/bin/activate && python -m pytest tests/acp/ -q
  • source venv/bin/activate && python -m pytest tests/ -q # currently has unrelated pre-existing failures on this checkout

@Git-on-my-level

Copy link
Copy Markdown
Contributor Author

Follow-up update pushed onto this PR.

This now also fixes delegated/subagent ACP stdout contamination:

  • child agents inherit the parent ACP-safe _print_fn sink
  • delegated children get a thinking callback relay so they do not fall back to raw quiet-mode spinners
  • quiet-mode spinners now only start when there is a safe sink (_print_fn) or a real TTY, which hardens other headless/protocol contexts against similar stdout leaks

Additional targeted coverage added in:

  • tests/tools/test_delegate.py
  • tests/test_run_agent.py

Re-run:

  • /Users/dazheng/.hermes/hermes-agent/venv/bin/python -m pytest tests/acp/ -q tests/tools/test_delegate.py -q tests/agent/test_subagent_progress.py -q tests/test_run_agent.py -q

@teknium1

teknium1 commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Merged via PR #5292. Your contribution (ACP stdout protocol-clean) was cherry-picked onto current main with your authorship preserved in git log. Thank you @Git-on-my-level!

@teknium1 teknium1 closed this Apr 5, 2026
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