Skip to content

fix(render): let the native tool protocol allow a lead-in line before tool calls - #15

Merged
senamakel merged 1 commit into
mainfrom
hermes-prompt-diet
Sep 22, 2026
Merged

senamakel merged 1 commit into
mainfrom
hermes-prompt-diet

Conversation

@senamakel

@senamakel senamakel commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Summary

native_instructions() told models: "Do not only narrate intent (for example, avoid "Let me check...") without emitting the tool call." The intent was "don't announce without acting", but the example read as a ban on any lead-in text, and hosts that also ban preamble in their own style rules (OpenHuman) ended up with models that emit tool calls and nothing else for the first 20–40 s of a turn.

Hermes gets a visible "Let me look that up…" in the same message as its web_search call at ~5 s on the same model; the difference is only that it does not forbid the line.

New wording:

When you need a tool, call it in this response through native tool-calling.
A short line saying what you are about to do is fine, but the tool call must be in the same message; never end a turn on an announcement.
After the results arrive, keep going until you can give the final answer.

The native tool-calling phrase the dialect test pins is preserved; a regression test asserts the lead-in is allowed and the old "Let me check" example is gone.

Testing

  • cargo test -p tinytools-agent (228 passed)
  • cargo fmt --check

Part of the OpenHuman orchestrator latency work (tinyhumansai/openhuman, branch hermes-prompt-diet).

Co-authored-by: Medulla medulla@tinyhumans.ai

Summary by CodeRabbit

  • Improvements
    • Updated native tool-use guidance to allow a brief lead-in announcement when the tool call occurs in the same response.
    • Clarified that tool calls should be made within the same message rather than only narrating intent.
    • Refined guidance for continuing from tool use to the final answer.

@tinysweeper

tinysweeper Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper reviewed this change across 6 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below.

State: Ready for maintainer review
Priority: none
Reviewed head: 16e1b8b9c399
Updated: 1790040812 (Unix time)

Review snapshot

Change surface Files Review signal Count
Production 1 Active findings 0
Tests 1 Noted findings 0
Documentation 0 Resolved findings 0
Configuration 0 Pending checks/questions 0

Completeness: Complete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

What changed

The review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below.

Features

None identified with supported citations.

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

Findings

No active actionable findings.

Before merge

None.

How this fits together

flowchart LR
  n0["one"]:::impacted
  n1["ok"]:::impacted
  n2["response"]:::impacted
  n3["...e_dialect_carries_the_flag_onto_the_entry"]:::impacted
  n4["...ect_values_fallback_and_protocol_metadata"]:::impacted
  n3 -->|calls| n0
  n3 -->|tests| n0
  n3 -->|calls| n1
  n3 -->|tests| n1
  n4 -->|calls| n0
  n4 -->|tests| n0
  n4 -->|calls| n1
  n4 -->|tests| n1
  n4 -->|calls| n2
  n4 -->|tests| n2
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading
Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 2 files; 0 findings. _The code index is behind this pull request (indexed at `d2d0a89e2c6b`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer: timed out after 20s), so this review saw part of what the engine holds._

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 2 files; 0 findings. _The code index is behind this pull request (indexed at `d2d0a89e2c6b`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer: timed out after 20s), so this review saw part of what the engine holds._

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: _The code index is behind this pull request (indexed at `d2d0a89e2c6b`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer: timed out after 20s), so this review saw part of what the engine holds._

commits

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: Nothing sensitive found in what this pull request commits.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: The change rewrites the native tool-use instruction to allow a lead-in sentence before a tool call, and adds unit tests that assert both a message and the tool call are released. The implementation matches the stated intent and is sound. _The code index is behind this pull request (indexed at `d2d0a89e2c6b`), so retrieved context may be out of date._ _2 memory call(s) failed (model: cortex: v1/answer: timed out after 20s), so this review saw part of what the engine holds._

e2e

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: No end-to-end harness in this repository: no e2e test files and no e2e workflow.
Evidence and run details
  • Models: flash, ladder/vectors, gpt-5.6-luna, deepseek/deepseek-v4-flash
  • Spend: $0.005041
  • Tokens: 104143 input · 3107 output · 23787 cached · 221 embedding
Head State Pass summary
16e1b8b9c399 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 1790040812)

tinysweeper 0.1.0

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-22T01:34:55.395121Z 16e1b8b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 0f1137c6-f206-499f-b11f-6efd661a4c45

📥 Commits

Reviewing files that changed from the base of the PR and between 9ae1d44 and 16e1b8b.

📒 Files selected for processing (2)
  • crates/tinytools-agent/src/dialect/test.rs
  • crates/tinytools-agent/src/render/instructions.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The native tool-use instructions now allow a brief announcement when the tool call occurs in the same message. The test verifies the new wording and the removal of the previous prohibitive wording.

Changes

Native tool-use guidance

Layer / File(s) Summary
Instruction wording and validation
crates/tinytools-agent/src/render/instructions.rs, crates/tinytools-agent/src/dialect/test.rs
native_instructions() now describes same-message tool calls, permits brief announcements, and updates continuation guidance. The test checks the new phrases and confirms that the old wording is absent.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 16e1b

The change permits brief same-message lead-ins for native tool calls while preserving the requirement to call the tool and continue to a final answer. It is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: allowing a lead-in line before native tool calls while retaining the native tool protocol context.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

A rabbit reads the call,
Same-message words stand tall.
A brief hello may start,
Then tools perform their part.
No turn ends mid-announcement.

Comment @coderabbitai help to get the list of available commands.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0050 · 104,143 in / 3,107 out · 23,787 cached (23%) · flash, ladder/vectors, gpt-5.6-luna, deepseek/deepseek-v4-flash · 221 embedded
critique:    $0.0023 · 46,146 in  / 767 out   · 3,315 cached (7%)   · gpt-5.6-luna
security:    $0.0015 · 29,591 in  / 252 out   · 0 cached (0%)       · gpt-5.6-luna
tests:       $0.0004 · 15,640 in  / 99 out    · 11,674 cached (75%) · deepseek/deepseek-v4-flash
description: $0.0002 · 6,968 in   / 84 out    · 3,000 cached (43%)  · deepseek/deepseek-v4-flash

@senamakel senamakel self-assigned this Sep 22, 2026
@senamakel
senamakel merged commit b3ba431 into main Sep 22, 2026
16 checks passed
@senamakel
senamakel deleted the hermes-prompt-diet branch September 22, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant