fix(agent): optimize dflash stall recovery telemetry - #37
Merged
Conversation
🔎 Lint report:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
dflashmodel alias.hard_stop_enabled.Why
Recent dflash MeshBoard sessions mostly recovered, but still wasted turns on action-preamble stalls and repeated low-information terminal probes. One latest-run trace showed the new guardrail ending the turn too bluntly after repeated terminal probes; this patch turns that into recoverable tool feedback by default.
How to Review
Review
agent/stall_retry.pyandagent/conversation_loop.pyfor the retry and telemetry path, then reviewagent/tool_guardrails.pyfor the low-information terminal redirect change. The tests intests/agent/test_stall_retry.pyandtests/run_agent/test_tool_call_guardrail_runtime.pycover the new behavior directly.Evidence
scripts/run_tests.sh tests/run_agent/test_run_agent.py tests/run_agent/test_tool_call_guardrail_runtime.py tests/agent/test_stall_retry.py tests/agent/test_tool_guardrails.py tests/agent/test_prompt_builder.py -- -qpassed: 529 tests, 0 failed.git diff --checkpassed with rc=0.python -m py_compile agent/stall_retry.py agent/conversation_loop.py agent/prompt_builder.py agent/tool_guardrails.py hermes_cli/config.pypassed with rc=0.Verification
Risks / Gaps
Collaborators
Participants: Omar, Codex.
Process: Reproduced from live Hermes/dflash MeshBoard traces, added focused regression coverage, then ran the broader main-loop tests.
Task context: MeshBoard task
hermes-dflash-stall-optimization-pass.Related work: Upstream mirror PR NousResearch#35694. Builds on fork PRs #28-#36 and the open upstream dflash retry stack.