Batching nudges: parallel-call prompt, codemode hint, call count #147

Merged
hermes merged 1 commits from perf/codemode-nudges into main 2026-10-12 12:34:40 +00:00
Collaborator

Fewer turns per task = fewer resent-context tokens.

  • Default prompt: one line telling the model to issue independent tool calls together (they already run in parallel via call_all).
  • codemode on: one static prompt line (3+ independent reads, or filter large output). Appended once, cache-safe.
  • New hx_core::nudge::BatchNudge hook: after 3 consecutive turns with a lone read-only call (read, or bash rg/fd/ls/cat/...), injects a one-line hint at turn end (fires once, then resets; any other call breaks the streak). Wording depends on codemode on/off.
  • codemode result header now says N tool calls so sessions show how much one script replaced.

Tests: nudges_after_streak_then_resets; fmt + tests/all.sh green.
Not done: live inner-call events in TUI; trimming the codemode tool list (measure first).

Fewer turns per task = fewer resent-context tokens. - Default prompt: one line telling the model to issue independent tool calls together (they already run in parallel via `call_all`). - `codemode` on: one static prompt line (3+ independent reads, or filter large output). Appended once, cache-safe. - New `hx_core::nudge::BatchNudge` hook: after 3 consecutive turns with a lone read-only call (`read`, or bash `rg/fd/ls/cat/...`), injects a one-line hint at turn end (fires once, then resets; any other call breaks the streak). Wording depends on codemode on/off. - codemode result header now says `N tool calls` so sessions show how much one script replaced. Tests: `nudges_after_streak_then_resets`; fmt + `tests/all.sh` green. Not done: live inner-call events in TUI; trimming the codemode tool list (measure first).
hermes added 1 commit 2026-10-12 12:34:04 +00:00
hermes merged commit d3390a823d into main 2026-10-12 12:34:40 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#147