Skip to content

fix(banner): show honcho tools as available when configured#3810

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-76df6a95
Mar 29, 2026
Merged

fix(banner): show honcho tools as available when configured#3810
teknium1 merged 1 commit intomainfrom
hermes/hermes-76df6a95

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Summary

Fixes honcho tools showing as red/disabled in the startup banner even when properly configured.

Problem

The honcho check_fn only checked runtime session state (_session_manager is not None), which isn't injected until AIAgent.__init__(). The banner renders before agent construction, so honcho tools always appeared unavailable at startup.

Fix

Updated _check_honcho_available() in tools/honcho_tools.py to check configuration as a fallback:

  1. Fast path (unchanged): if session context is active, return True immediately
  2. Slow path (new): if no session, load HonchoClientConfig.from_global_config() and check enabled + api_key/base_url
  3. Graceful fallback: if honcho_integration isn't installed, return False

This correctly reflects "will honcho work once the session starts?" rather than "is honcho running right now?"

Tests

4 new tests in test_honcho_tools.py:

  • Session active → True
  • Configured but no session (banner time) → True
  • Not configured → False
  • Import failure (package not installed) → False

Closes #1843 (took the intent, implemented differently — the original PR had a dict key bug and the delegate_tool change was stale).

The honcho check_fn only checked runtime session state, which isn't
set until the agent initializes. At banner time, honcho tools showed
as red/disabled even when properly configured.

Now checks configuration (enabled + api_key/base_url) as a fallback
when the session context isn't active yet. Fast path (session active)
unchanged; slow path (config check) only runs at banner time.

Adds 4 tests covering: session active, configured but no session,
not configured, and import failure graceful fallback.

Closes #1843.
@teknium1 teknium1 merged commit c774833 into main Mar 29, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant