Skip to content

Comments

Restore tool call rendering with lifecycle tracking#14

Merged
evantahler merged 2 commits intomainfrom
evantahler/show-tool-calls
Feb 18, 2026
Merged

Restore tool call rendering with lifecycle tracking#14
evantahler merged 2 commits intomainfrom
evantahler/show-tool-calls

Conversation

@evantahler
Copy link
Contributor

Summary

  • Iterates the full OpenAI agents stream to detect tool_called and tool_output events
  • Tracks tool call lifecycle (running → completed) with arguments and execution time
  • Displays tool calls as a formatted tree with 🛠️ root label and proper status indicators
  • Tool calls persist in chat history rather than disappearing after streaming ends

How it works

When the agent invokes a tool, the stream emits tool_called with the tool name, arguments, and call ID. When the tool completes, tool_output emits with the same call ID. The logger tracks both events and the UI renders them as a tree:

🛠️ Tool calls:
  ├─ ⏳ search({"q":"hello"})
  └─ ✓ read_file({...}) (1.2s)

Running calls show ⏳ (yellow), completed calls show ✓ with duration (green).

🤖 Generated with Claude Code

evantahler and others added 2 commits February 17, 2026 18:58
Detects 'tool_called' and 'tool_output' events from the OpenAI agents stream
to show which tools the agent invoked, their arguments, and execution time.
Tool calls now persist in the chat history and display as a formatted tree
with running/completed status, rather than disappearing after streaming ends.
The tool call tree also includes a root label and proper spacing before
response text.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@evantahler evantahler merged commit b9b798a into main Feb 18, 2026
4 checks passed
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.

1 participant