Bug Description
Langfuse receives traces from Hermes, but with two critical issues:
- LLM generation inputs missing and outputs don't include the LLM response
- Tool arguments are visible, but tool outputs are
undefined
This causes langfuse plugin to have very little value since the main points of interest for observability are missing.
Steps to Reproduce
- set up langfuse side
- enable langfuse plugin
- chat with hermes and ask for a tool call
- observe in langfuse LLM generation that input and output are missing
- observe in langfuse Tool that tool output is missing
Expected Behavior
Langfuse should show LLM input and output and tool output
Actual Behavior
langfuse LLM generation that input and output are missing and tool output is undefined
Affected Component
Other: Langfuse plugin and potentially other hooks
Messaging Platform (if gateway-related)
N/A (CLI only)
Debug Report
Report https://paste.rs/b2MNF
agent.log https://dpaste.com/CPWQ2JA8W
gateway.log https://dpaste.com/45KYY968F
Operating System
Debian 13
Python Version
3.11.15
Hermes Version
v0.13.0 (2026.5.7)
Root Cause Analysis (optional)
-
LLM generation inputs were empty and outputs don't include the LLM response. on_pre_llm_request read only the messages kwarg, but depending on Hermes version and
call path the actual request payload arrives as request_messages, conversation_history, or user_message. Generations showed
an empty input instead of the real outbound message list.
-
Tool observations had no output. The Tool: child span in Langfuse showed input (arguments) but Output: undefined.
Root cause: when Hermes fires pre_tool_call and post_tool_call without a tool_call_id (the common case for most built-in and
registry tools), the plugin stored the observation under a unique time.time_ns()-based key in on_pre_tool_call that
on_post_tool_call could never reconstruct. The post hook fell back to popitem() which is unreliable under concurrent tool
calls. Every tool span ended up closed by the _finish_trace sweep with no output set.
Proposed Fix (optional)
Opened PR with fix: #22345
Are you willing to submit a PR for this?
Bug Description
Langfuse receives traces from Hermes, but with two critical issues:
undefinedThis causes langfuse plugin to have very little value since the main points of interest for observability are missing.
Steps to Reproduce
Expected Behavior
Langfuse should show LLM input and output and tool output
Actual Behavior
langfuse LLM generation that input and output are missing and tool output is
undefinedAffected Component
Other: Langfuse plugin and potentially other hooks
Messaging Platform (if gateway-related)
N/A (CLI only)
Debug Report
Operating System
Debian 13
Python Version
3.11.15
Hermes Version
v0.13.0 (2026.5.7)
Root Cause Analysis (optional)
LLM generation inputs were empty and outputs don't include the LLM response. on_pre_llm_request read only the messages kwarg, but depending on Hermes version and
call path the actual request payload arrives as request_messages, conversation_history, or user_message. Generations showed
an empty input instead of the real outbound message list.
Tool observations had no output. The Tool: child span in Langfuse showed input (arguments) but Output: undefined.
Root cause: when Hermes fires pre_tool_call and post_tool_call without a tool_call_id (the common case for most built-in and
registry tools), the plugin stored the observation under a unique time.time_ns()-based key in on_pre_tool_call that
on_post_tool_call could never reconstruct. The post hook fell back to popitem() which is unreliable under concurrent tool
calls. Every tool span ended up closed by the _finish_trace sweep with no output set.
Proposed Fix (optional)
Opened PR with fix: #22345
Are you willing to submit a PR for this?