Skip to content

fix(honcho): default SDK HTTP timeout to 30s to prevent indefinite blocking - #15360

Closed
erosika wants to merge 1 commit into
NousResearch:mainfrom
erosika:fix/honcho-default-http-timeout-30s
Closed

fix(honcho): default SDK HTTP timeout to 30s to prevent indefinite blocking#15360
erosika wants to merge 1 commit into
NousResearch:mainfrom
erosika:fix/honcho-default-http-timeout-30s

Conversation

@erosika

@erosika erosika commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Adopts #13623 by @twozle with original authorship preserved.

The honcho-ai SDK defaults to a short HTTP timeout. Cold starts and slow backends can exceed it, causing the agent to block indefinitely on the post-response Honcho write path and preventing the gateway from delivering already-generated responses.

Adds a 30s default applied when no explicit timeout is configured via HonchoClientConfig.timeout, honcho.timeout / requestTimeout in config, or HONCHO_TIMEOUT.

  • plugins/memory/honcho/client.py: +14 (constant + fallback)
  • tests/honcho_plugin/test_client.py: +22 (1 new test)

228/228 honcho_plugin tests pass locally.

Overlaps with #10372 (make configurable) — this is the simpler fix; #10372 can layer on top if desired.

When no explicit timeout is configured (HonchoClientConfig.timeout,
honcho.timeout / requestTimeout, or HONCHO_TIMEOUT), get_honcho_client
previously constructed the SDK with no timeout kwarg, letting the
underlying httpx client hang indefinitely if the Honcho backend
became unreachable mid-request.

This is a silent-failure hazard on the post-response path of
run_conversation: the memory_manager.sync_all() / queue_prefetch_all()
calls fire after the agent has already generated its final reply, so
a stalled Honcho request blocks run_conversation from returning.
The gateway never logs "response ready" and never delivers the
response to the platform (Telegram, etc.), even though the text is
already saved to the session file.

Repro: unplug the network or block app.honcho.dev mid-turn after
the model has produced its final message. Without this change,
_run_agent never returns. With it, the call aborts after 30s,
run_conversation returns, and the gateway delivers the response
(Honcho sync failure is logged and swallowed as before).

The default applies only when nothing is configured, so any
deployment that has explicitly set timeout / HONCHO_TIMEOUT /
honcho.timeout / honcho.requestTimeout keeps its existing value.
Self-hosted deployments that genuinely need a longer ceiling can
still override via any of those knobs.
@erosika

erosika commented Apr 24, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #15381 (consolidated).

@erosika erosika closed this Apr 24, 2026
@erosika
erosika deleted the fix/honcho-default-http-timeout-30s branch April 24, 2026 22:11
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/plugins Plugin system and bundled plugins labels Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants