Skip to content

[Bug]: Type issue in GPT pools #25516

@roderik

Description

@roderik

Bug Description

Trigger: Every outbound request to a GPT-family provider (OpenAI gpt-, OpenRouter, etc.) fails immediately with this error before any HTTP request is made.

*Full traceback points to: gateway/provider_pool/credential_pool.py line 277, in function _exhausted_until(entry, entry.last_error_code)

Line 277crashes when last_status_at is an ISO string, not a float
return entry.last_status_at + _exhausted_ttl(entry.last_error_code)

Root cause: Pool entry serialization via to_dict() / from_dict() round-trips last_status_at as an ISO string (e.g. "2026-05-11T08:23:20.891066+00:00") instead of a Unix epoch float. When the entry is reloaded from disk and _exhausted_until is called, str + int raises TypeError.

The existing _parse_absolute_timestamp() helper already handles ISO strings, epoch ms, and float epochs — it just was not being applied to last_status_at on the rehydrated entry.

Steps to Reproduce

Use a GPT codex pool and have one hit its limits

Expected Behavior

No error

Actual Behavior

Errror

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

Telegram

Debug Report

Have no access right now, but the fix above fixed it for me

Operating System

Ubuntu

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundcomp/agentCore agent loop, run_agent.py, prompt builderprovider/openaiOpenAI / Codex Responses APIsweeper:implemented-on-mainSweeper: behavior already present on current maintype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions