refactor(execute_code): schema diet — persistence woven in, not bolted on (712 → 654 tok/call) - #96997
Merged
Conversation
…scription (712 -> 654 tok/call, -8%)
Contributor
૮ >ﻌ< ა ci reviewran on 5dc9178 — fix(execute_code): honest interpreter note — Hermes's own py
|
…he common case; project venv only when VIRTUAL_ENV/CONDA_PREFIX is active
5 tasks
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
…d on (712 → 654 tok/call) (NousResearch#96997) * refactor(execute_code): integrate kernel persistence into the core description (712 -> 654 tok/call, -8%) * fix(execute_code): honest interpreter note — Hermes's own python is the common case; project venv only when VIRTUAL_ENV/CONDA_PREFIX is active
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.
Campaign entry (#95681), post-kernel-adoption cleanup. The kernel arc (#94647/#96787/#96991) grew execute_code's served schema 631 → 712 by APPENDING a conditional kernel paragraph behind a now-dead
_get_kernel_mode()check. This PR makes persistence part of the tool's one story instead of a bolt-on, and sweeps prose the kernel made stale.Changes (all editorial — zero behavior)
kernelfield tells the truth per call — teaching every session about a rare degraded path is rent not worth paying.Numbers (as served, o200k_base, full toolset)
The dynamic machinery (per-session tool-stub filtering, strict/project cwd variants) is untouched — it's the good kind of dynamic. Contract test updated:
test_kernel_persistence_is_taught_unconditionallypins that every session learns persistence + reset, in both modes, regardless of stale config keys.Tests: 86 passed / 1 pre-existing failure (TestRpcTokenAuthorization, predates the arc).