Skip to content

[Bug] model= empty on recovery turn after stream_interrupt_abort — "trying fallback..." logged but never executed, session goes silent #35314

@ronyB89

Description

@ronyB89

Summary
After a stream_interrupt_abort during an active gateway session (Discord), the recovery conversation turn is sometimes created with model= (empty). Subsequent API calls fail with HTTP 400: No models provided. The system logs ⚠️ Non-retryable error (HTTP 400) — trying fallback... but the fallback is never actually invoked — the session becomes permanently non-responsive until the user manually re-sends their message. The configured model.default and session history are correct; only the post-interrupt recovery turn loses the model.

Steps to Reproduce

  1. Run Hermes Agent gateway (Discord platform) with busy_input_mode: interrupt
  2. Have an active long-running session (deepseek/deepseek-v4-flash via OpenRouter in our case)
  3. Send a message while the agent is processing a tool turn → triggers stream_interrupt_abort
  4. The recovery turn's conversation turn log shows model= (empty) instead of the configured model
  5. API call fails with HTTP 400: No models provided — 3 retry attempts all use the empty model
  6. "⚠️ Non-retryable error (HTTP 400) — trying fallback..." is logged but fallback_model is never called
  7. Session is dead until user manually re-sends

Frequency
~2 out of ~20+ interrupts across 2 sessions in a ~20-minute window. Most interrupts work fine and retain the model.

Timeline from agent.log (session 20260530_115228_72da9eec)

11:57:38 → stream_interrupt_abort, model=deepseek/deepseek-v4-flash ✅
11:57:38 → conversation turn model= ← EMPTY ⚡
11:57:42 → API call failed: HTTP 400 No models provided (attempt 1/3)
11:57:42 → "⚠️ Non-retryable error (HTTP 400) — trying fallback..."
        → fallback NEVER executes
        → 54 minutes of dead silence
12:51:42 → [user] resends message manually → model=deepseek ✅ works immediately

Timeline from session 20260530_102010_3ad067ec

11:37:49 → stream_interrupt_abort, model=deepseek ✅
11:37:49 → OpenAI client created (agent_init, shared=True) model= ← EMPTY ⚡
11:37:50 → conversation turn model= ← EMPTY
        → Same failure pattern

Root cause analysis (from logs)

  • The OpenAI client created (agent_init, shared=True) log sometimes shows model= empty after an interrupt
  • This is NOT every interrupt — ~8 other interrupts in the same session retained the model
  • The bug correlates with OpenAI client created being triggered after the interrupt (client recreated), vs. client reuse which preserves the model
  • The fallback announced in the UI is never actually dispatched (confirmed: no fallback API calls in agent.log)

Environment

  • Hermes Agent version: v0.14.0+ (current HEAD)
  • Platform: Discord gateway
  • Provider: openrouter
  • Model: deepseek/deepseek-v4-flash
  • OS: Linux

Related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundcomp/agentCore agent loop, run_agent.py, prompt buildercomp/gatewayGateway runner, session dispatch, deliveryplatform/discordDiscord bot adaptertype/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