Skip to content

Conversation

@seratch
Copy link
Member

@seratch seratch commented Dec 24, 2025

This pull request resolves the potential errors with tracing providers when streams are already closed:

--- Logging error ---
Traceback (most recent call last):
  File "uv/python/cpython-3.12.9-macos-aarch64-none/lib/python3.12/logging/__init__.py", line 1163, in emit
    stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
  File "openai-agents-python/src/agents/tracing/provider.py", line 309, in shutdown
    logger.debug("Shutting down trace provider")
Message: 'Shutting down trace provider'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "uv/python/cpython-3.12.9-macos-aarch64-none/lib/python3.12/logging/__init__.py", line 1163, in emit
    stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
  File "openai-agents-python/src/agents/tracing/provider.py", line 310, in shutdown
    self._multi_processor.shutdown()
  File "openai-agents-python/src/agents/tracing/provider.py", line 86, in shutdown
    logger.debug(f"Shutting down trace processor {processor}")
Message: 'Shutting down trace processor <tests.testing_processor.SpanProcessorForTests object at 0x10d54dca0>'
Arguments: ()

@seratch seratch added this to the 0.7.x milestone Dec 24, 2025
@seratch seratch added bug Something isn't working feature:tracing labels Dec 24, 2025
@seratch seratch changed the title fix: Improve HITL approval handling and tracing shutdown safety fix: Improve tracing shutdown safety Dec 24, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2026

This PR is stale because it has been open for 10 days with no activity.

@github-actions github-actions bot added the stale label Jan 4, 2026
@seratch seratch removed the stale label Jan 5, 2026
@seratch seratch requested a review from rm-openai January 5, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature:tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants