mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
dialecticMaxChars (default 600) is documented as the budget for the dialectic supplement auto-injected into the system prompt every turn — a small recurring cost that is correct to bound tightly. But dialectic_query() applied that cap unconditionally, so explicit honcho_reasoning tool calls — where the model deliberately spends a turn asking for a synthesized answer — were silently truncated mid-word to 600 chars with a trailing " …", no error surfaced. The full answer is returned by Honcho server-side; the clip happens client-side. The auto-injection path already has its own token-based budget (contextTokens, enforced in prefetch() via _truncate_to_budget), so the char cap's real job is a cheap always-on guardrail for that recurring injection. Explicit tool results are already bounded server-side by Honcho's dialectic MAX_OUTPUT_TOKENS and don't need the injection cap — sibling tools (honcho_search, honcho_context) don't post-clip their results either. Add apply_injection_cap (default True, preserving current behavior) to dialectic_query(); the honcho_reasoning tool handler passes False so it returns Honcho's full synthesized answer. Auto-injection is unchanged. Tests cover both the capped injection path and the uncapped tool path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_async_memory.py | ||
| test_cli.py | ||
| test_client.py | ||
| test_empty_profile_hint.py | ||
| test_oauth.py | ||
| test_oauth_flow.py | ||
| test_pin_peer_name.py | ||
| test_query_rewrite.py | ||
| test_session.py | ||