hermes-agent/scripts
Michael Jordan ac48add3a7 feat(agent): report context occupancy, not just tokens saved
Tokens saved is the wrong headline for this feature. Micro-compaction is
not an efficiency optimisation — the same summarization work happens either
way. What it buys is (a) that work amortized across turns instead of one
stall, and (b) a window kept low enough that a session runs much further
before needing a hard compaction at all.

Neither shows up in "net tokens saved". A session can save nothing on paper
and still be a clear win on both counts.

So the telemetry now carries occupancy: tokens_after as a share of the
compaction threshold, plus the threshold and resolved window it was
computed from. That is the number that says whether a session has headroom
left. The report leads with it, and cross-references the batch
`compression_attempt` lines already in the log so it can show how often the
long pause actually fired — ideally never.

Occupancy is read from the cached threshold only. The public
`threshold_tokens` property resolves lazily and can issue a synchronous
/models probe (#32221); telemetry must never be the thing that blocks a
turn, so an unresolved window reports null. In practice a pass has already
resolved it via the tail calculation, so the field is populated. A test
pins the no-forcing behaviour directly against the emitter.

The report is pure ASCII: `scripts/check_subprocess_stdin.py` currently
dies on a cp1252 console before printing its results, and a diagnostic tool
that crashes on the platform it is diagnosing is worse than no tool.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 17:44:19 +05:30
..
ci fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
lib fix(hermes): heal broken managed Node tree instead of PATH fallback 2026-06-26 20:10:20 +05:30
observability fix(monitoring): drain terminal lifecycle events 2026-07-24 18:54:45 +00:00
tests fix(install): detect Git Bash Mandatory ASLR failures (#64651) 2026-07-16 22:46:46 -04:00
whatsapp-bridge fix(whatsapp): apply read receipts after intake policy 2026-07-28 18:02:51 +05:30
add_contributor.py fix(scripts): accept legacy consecutive-hyphen GitHub logins in add_contributor 2026-07-24 22:40:15 -07:00
analyze_livetest.py fix: remove dead f-string prefixes via ruff F541 (216 sites) (#52336) 2026-07-05 13:42:46 -07:00
benchmark_browser_eval.py perf(browser): route browser_console eval through supervisor's persistent CDP WS (180x faster) (#23226) 2026-05-10 07:37:55 -07:00
build_model_catalog.py feat(models): catalog-labeled silent default — GLM-5.2 marked "default": true in the model catalog 2026-07-15 00:10:31 -07:00
build_skills_index.py refactor: remove the claude-marketplace skill source (redundant Marketplace hub tab) 2026-07-28 23:16:27 -07:00
capture-cage-terminal.sh feat(devshell): add terminal UI capture tools (#69629) 2026-07-22 17:28:21 -04:00
check-windows-footguns.py fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
check_subprocess_stdin.py fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
contributor_audit.py fix: add explicit UTF-8 encoding to all subprocess text=True calls (#53428) 2026-07-24 11:45:57 -07:00
dev-sandbox.sh feat(dev-sandbox): add --from DIR to seed sandbox HERMES_HOME (#66486) 2026-07-17 19:45:41 +00:00
discord-voice-doctor.py codebase: add encoding='utf-8' to all bare open() calls (PLW1514) 2026-05-08 14:27:40 -07:00
docker_config_migrate.py refactor: config auto-migration support floor at v12 + deprecated shim retirement 2026-07-29 16:44:31 -07:00
docker_rebootstrap_nous_session.py fix(auth): apply newer hosted bootstrap session (#64612) 2026-07-16 08:52:47 +10:00
generate_conformance_vectors.py feat(conformance): vector generator — native renderers as executable spec (#71666) 2026-07-26 16:52:25 +10:00
hermes-gateway
install.cmd fix(docs): update all install instructions everywhere 2026-06-04 21:07:45 -04:00
install.ps1 fix(installer): never let a stale --commit pin roll an install backwards 2026-07-29 17:35:16 -05:00
install.sh fix(installer): never let a stale --commit pin roll an install backwards 2026-07-29 17:35:16 -05:00
install_psutil_android.py revert(windows): roll back terminal-popup PRs #53791 #53810 #53829 (#53853) 2026-06-27 15:59:00 -07:00
iso-certify.py fix(windows): sweep remaining unguarded text-mode subprocess sites codebase-wide 2026-07-24 11:45:57 -07:00
keystroke_diagnostic.py docs: add Windows-Specific Quirks section to hermes-agent skill + keystroke diagnostic 2026-05-08 14:27:40 -07:00
kill_modal.sh
lint_diff.py fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
LIVETEST_README.md test(tool-search): add live A/B harness, drop checked-in transcripts 2026-05-29 02:04:12 -07:00
micro_compaction_report.py feat(agent): report context occupancy, not just tokens saved 2026-07-31 17:44:19 +05:30
profile-tui.py fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
release.py chore: add contato@webtecnica.com.br → webtecnica to AUTHOR_MAP 2026-07-30 20:52:19 +05:00
run_tests.sh fix(test-runner): native Windows venv probe + glyph-safe stdio 2026-07-29 21:30:53 -07:00
run_tests_parallel.py fix(test-runner): native Windows venv probe + glyph-safe stdio 2026-07-29 21:30:53 -07:00
sample_and_compress.py fix: remove dead f-string prefixes via ruff F541 (216 sites) (#52336) 2026-07-05 13:42:46 -07:00
smoke_nemo_relay_shared_metrics.py Reapply "feat(observability): integrate NeMo Relay runtime and shared metrics" 2026-07-27 21:10:51 -07:00
tool_search_livetest.py bench: Unreal-scale live benchmark — Epic's real 830 UE 5.8 schemas replayed (Opus 4.8) 2026-07-26 08:26:09 -07:00
tool_search_livetest2.py fix(lint): encode remaining write_text calls in the tool_search livetest harness 2026-07-26 11:54:03 -07:00
tool_search_livetest_ue.py fix(lint): explicit encoding on probe-file open in UE harness (PLW1514 + windows-footguns) 2026-07-26 08:26:09 -07:00
tool_search_livetest_ue_disc.py bench: discovery-bound suite — paraphrase/absence/survey tasks isolate the listing's structural advantage 2026-07-26 08:26:09 -07:00
tool_search_livetest_ue_hard.py bench: adversarial 830-tool gauntlet — confusion clusters, type-aware error mocks, strict scoring 2026-07-26 08:26:09 -07:00