Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions agent/conversation_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -3945,8 +3945,14 @@ def _stop_spinner():
print(f"❌ {error_msg}")
except (OSError, ValueError):
logger.error(error_msg)

logger.debug("Outer loop error in API call #%d", api_call_count, exc_info=True)

# Emit the full traceback at ERROR level so it lands in both
# agent.log AND errors.log. Previously this was logged at DEBUG,
# which meant intermittent outer-loop failures were unreproducible
# — users would see a one-line summary on screen with no way to
# recover the call site. logger.exception() includes the
# traceback automatically and emits at ERROR.
logger.exception("Outer loop error in API call #%d", api_call_count)

# If an assistant message with tool_calls was already appended,
# the API expects a role="tool" result for every tool_call_id.
Expand Down
Loading