fix+feat: bug fixes, auto session titles, .hermes.md project config#1712
Merged
fix+feat: bug fixes, auto session titles, .hermes.md project config#1712
Conversation
The function uses subprocess.run() and subprocess.CalledProcessError but never imported the module. This caused a NameError crash during setup when users selected NeuTTS as their TTS provider. Fixes #1698
When container_persistent=false, the inner mini-swe-agent cleanup only runs 'docker stop' in the background, leaving containers in Exited state. Now cleanup() also runs 'docker rm -f' to fully remove the container. Also fixes pre-existing test failures in model_metadata (gpt-4.1 1M context), setup tests (TTS provider step), and adds MockInnerDocker.cleanup(). Original fix by crazywriter1. Cherry-picked and adapted for current main. Fixes #1679
After the first user→assistant exchange, Hermes now generates a short descriptive session title via the auxiliary LLM (compression task config). Title generation runs in a background thread so it never delays the user-facing response. Key behaviors: - Fires only on the first 1-2 exchanges (checks user message count) - Skips if a title already exists (user-set titles are never overwritten) - Uses call_llm with compression task config (cheapest/fastest model) - Truncates long messages to keep the title generation request small - Cleans up LLM output: strips quotes, 'Title:' prefixes, enforces 80 char max - Works in both CLI and gateway (Telegram/Discord/etc.) Also updates /title (no args) to show the session ID alongside the title in both CLI and gateway. Implements #1426
Adds .hermes.md / HERMES.md discovery for per-project agent configuration. When the agent starts, it walks from cwd to the git root looking for .hermes.md (preferred) or HERMES.md, strips any YAML frontmatter, and injects the markdown body into the system prompt as project context. - Nearest-first discovery (subdirectory configs shadow parent) - Stops at git root boundary (no leaking into parent repos) - YAML frontmatter stripped (structured config deferred to Phase 2) - Same injection scanning and 20K truncation as other context files - 22 comprehensive tests Original implementation by ch3ronsa. Cherry-picked and adapted for current main. Closes #681 (Phase 1)
This was referenced Mar 17, 2026
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.
Summary
Batch of bug fixes, feature implementations, and issue triage.
Bug Fixes
1. Missing subprocess import in setup.py (Fixes #1698)
_install_neutts_deps()usedsubprocess.run()without importing the module. 1-line fix.2. Docker container_persistent=false not respected (Fixes #1679)
When
container_persistent=false, cleanup() now runsdocker rm -fto fully remove the container.Salvaged from PR #1691 by @crazywriter1 — original authorship preserved.
3. Pre-existing test fixes
test_model_metadata: gpt-4.1 models have 1M contexttest_setup/test_setup_model_provider: account for TTS provider stepMockInnerDocker.cleanup()stub addedFeatures
4. Auto-generated session titles (Implements #1426)
After the first user→assistant exchange, Hermes generates a short descriptive session title via auxiliary LLM. Runs in a background thread — never delays the response. Works in both CLI and gateway.
/title(no args) now also shows session ID.5. .hermes.md per-repository project config (Closes #681)
Discovers
.hermes.md/HERMES.mdby walking from cwd to git root. Strips YAML frontmatter and injects markdown body as project context.Salvaged from PR #1200 by @ch3ronsa — original authorship preserved.
Issues Closed (already resolved on main)
Test plan
pytest tests/tools/test_docker_environment.py— 10 passedpytest tests/agent/test_title_generator.py— 15 passedpytest tests/agent/test_prompt_builder.py— 87 passed