Skip to content

Add separator banners to TOOL USE, AGENT START, and ERROR events#26

Merged
galuszkm merged 2 commits into
mainfrom
copilot/add-separator-banners-tool-use-agent-start-error-e
Apr 12, 2026
Merged

Add separator banners to TOOL USE, AGENT START, and ERROR events#26
galuszkm merged 2 commits into
mainfrom
copilot/add-separator-banners-tool-use-agent-start-error-e

Conversation

Copilot AI commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

AnsiRenderer only showed separator banners for REASONING and RESPONDING mode transitions. TOOL USE, AGENT START, and ERROR events rendered as plain status lines, making them hard to spot in dense multi-agent output.

Changes

  • ansi.py__init__: Add self._magenta (\033[95m]) for transition/action events
  • ansi.py_handle_tool_start: Add TOOL USE separator (magenta), reset _active_agent
  • ansi.py_handle_agent_start: Add AGENT START separator (magenta)
  • ansi.py_handle_error: Add ERROR separator (red)
  • test_ansi.py: Verify separator text appears for all three event types

Color scheme

Separator Color Semantic group
REASONING Yellow Thinking
RESPONDING Cyan Output
TOOL USE / AGENT START Bright magenta Transition/action
ERROR Red Danger

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

- Add `self._magenta` (bright magenta \033[95m]) ANSI color in __init__
- Add TOOL USE separator banner (magenta) to _handle_tool_start
- Add AGENT START separator banner (magenta) to _handle_agent_start
- Add ERROR separator banner (red) to _handle_error
- Reset _active_agent in _handle_tool_start for proper mode transitions
- Add tests verifying separator text appears in rendered output

Agent-Logs-Url: https://github.com/strands-compose/sdk-python/sessions/fa2d145b-5b66-4434-b1d2-eadf0473f279

Co-authored-by: galuszkm <53984802+galuszkm@users.noreply.github.com>
Copilot AI changed the title [WIP] Add separator banners for tool use, agent start, and error events Add separator banners to TOOL USE, AGENT START, and ERROR events Apr 12, 2026
Copilot AI requested a review from galuszkm April 12, 2026 01:58
@galuszkm galuszkm marked this pull request as ready for review April 12, 2026 02:05

@galuszkm galuszkm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@galuszkm galuszkm merged commit a9cb0a3 into main Apr 12, 2026
11 checks passed
@galuszkm galuszkm deleted the copilot/add-separator-banners-tool-use-agent-start-error-e branch April 12, 2026 04:05
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.

Add separator banners to TOOL USE, AGENT START, and ERROR events with unified color scheme

2 participants