hermes - 💡(How to fix) Fix [Feature]: replace codex intermediate-ack heuristic with a cheap auxiliary completion classifier [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#12567Fetched 2026-04-20 12:18:13
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Timeline (top)
commented ×1labeled ×1
RAW_BUFFERClick to expand / collapse

Problem or Use Case

Hermes currently uses a heuristic _looks_like_codex_intermediate_ack() check to decide whether a Codex response is just an intermediate acknowledgement ("I'll inspect the repo", "let me check that", etc.) and whether the turn should continue.

This helps avoid premature turn termination, but the current keyword-based approach is brittle:

  • it can false-positive on normal responses that happen to mention action/workspace terms
  • it can false-negative on intermediate acknowledgements phrased differently
  • the rule is difficult to keep complete across providers, models, and prompt styles

In practice, this means turn control is partially driven by a fragile text heuristic rather than a more explicit completion signal.

Proposed Solution

Add an optional lightweight auxiliary classification step for ambiguous Codex responses.

Suggested behavior:

  • keep the current fast heuristic as the first-pass cheap path
  • only for ambiguous cases, call a cheap auxiliary text model to classify the response as one of:
    • final answer
    • intermediate acknowledgement / planning utterance
    • incomplete generation
  • continue the turn only when the classifier returns intermediate/incomplete
  • keep the current heuristic as a fallback when no auxiliary provider is configured

This would preserve the low-cost path for obvious cases while reducing both false positives and false negatives.

Alternatives Considered

  • Expand the heuristic keyword list further
    This improves coverage a bit but does not solve the core brittleness problem.
  • Rely only on provider-native finish reasons
    This is cleaner, but some real-world outputs still appear ambiguous at the text layer.
  • Always invoke a second model
    This is likely too expensive and adds latency; a hybrid heuristic + classifier approach seems more practical.

Feature Type

Performance / reliability

Scope

Medium (few files, < 300 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

extent analysis

TL;DR

Implement an optional auxiliary classification step using a lightweight text model to improve the accuracy of identifying intermediate Codex responses.

Guidance

  • Identify the current heuristic's false positives and false negatives to understand the limitations of the keyword-based approach.
  • Design the auxiliary classification step to classify responses into three categories: final answer, intermediate acknowledgement, and incomplete generation.
  • Develop a fallback mechanism to use the current heuristic when no auxiliary provider is configured.
  • Evaluate the performance and reliability impact of the new approach, considering factors like latency and accuracy.

Example

No code snippet is provided as the issue does not contain specific implementation details.

Notes

The proposed solution aims to balance accuracy and performance by using a hybrid approach, but its effectiveness depends on the quality of the auxiliary text model and the configuration of the fallback mechanism.

Recommendation

Apply the proposed workaround by implementing the auxiliary classification step, as it addresses the core brittleness problem of the current heuristic and provides a more explicit completion signal.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Feature]: replace codex intermediate-ack heuristic with a cheap auxiliary completion classifier [1 comments, 2 participants]