hermes-agent/agent
Teknium 12724e6295
feat: progressive subdirectory hint discovery (#5291)
As the agent navigates into subdirectories via tool calls (read_file,
terminal, search_files, etc.), automatically discover and load project
context files (AGENTS.md, CLAUDE.md, .cursorrules) from those directories.

Previously, context files were only loaded from the CWD at session start.
If the agent moved into backend/, frontend/, or any subdirectory with its
own AGENTS.md, those instructions were never seen.

Now, SubdirectoryHintTracker watches tool call arguments for file paths
and shell commands, resolves directories, and loads hint files on first
access. Discovered hints are appended to the tool result so the model
gets relevant context at the moment it starts working in a new area —
without modifying the system prompt (preserving prompt caching).

Features:
- Extracts paths from tool args (path, workdir) and shell commands
- Loads AGENTS.md, CLAUDE.md, .cursorrules (first match per directory)
- Deduplicates — each directory loaded at most once per session
- Ignores paths outside the working directory
- Truncates large hint files at 8K chars
- Works on both sequential and concurrent tool execution paths

Inspired by Block/goose SubdirectoryHintTracker.
2026-04-05 12:33:47 -07:00
..
__init__.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
anthropic_adapter.py fix: preserve Anthropic thinking block signatures across tool-use turns 2026-04-02 10:30:32 -07:00
auxiliary_client.py fix: use main provider model for auxiliary tasks on non-aggregator providers (#5091) 2026-04-04 12:07:43 -07:00
builtin_memory_provider.py feat(memory): pluggable memory provider interface with profile isolation, review fixes, and honcho CLI restoration (#4623) 2026-04-02 15:33:51 -07:00
context_compressor.py fix: cap percentage displays at 100% in stats, gateway, and memory tool (#3599) 2026-03-28 14:55:18 -07:00
context_references.py fix(security): add .config/gh to read protection for @file references (#4327) 2026-03-31 12:48:30 -07:00
copilot_acp_client.py fix(acp): preserve leading whitespace in streaming chunks 2026-03-20 09:38:13 -07:00
credential_pool.py Preserve numeric credential labels in auth removal 2026-04-05 00:20:53 -07:00
display.py feat: add inline diff previews for write actions 2026-04-01 02:13:57 -07:00
insights.py fix(insights): show cache tokens in overview so total adds up (#4428) 2026-04-01 03:06:47 -07:00
memory_manager.py feat(memory): pluggable memory provider interface with profile isolation, review fixes, and honcho CLI restoration (#4623) 2026-04-02 15:33:51 -07:00
memory_provider.py feat(memory): pluggable memory provider interface with profile isolation, review fixes, and honcho CLI restoration (#4623) 2026-04-02 15:33:51 -07:00
model_metadata.py fix(opencode-go): strip trailing /v1 from base URL for Anthropic models (#4918) 2026-04-03 18:47:51 -07:00
models_dev.py feat: /model command — models.dev primary database + --provider flag (#5181) 2026-04-05 01:04:44 -07:00
prompt_builder.py fix: respect per-platform disabled skills in Telegram menu and gateway dispatch (#4799) 2026-04-03 10:10:53 -07:00
prompt_caching.py fix(prompt-caching): skip top-level cache_control on role:tool for OpenRouter 2026-03-21 16:54:43 -07:00
redact.py fix: remove stale test skips, fix regex backtracking, file search bug, and test flakiness 2026-04-04 10:18:57 -07:00
skill_commands.py fix(gateway): resolve Telegram's underscored /commands to skill/plugin keys 2026-04-05 11:59:28 -07:00
skill_utils.py fix: respect per-platform disabled skills in Telegram menu and gateway dispatch (#4799) 2026-04-03 10:10:53 -07:00
smart_model_routing.py Merge branch 'main' into rewbs/tool-use-charge-to-subscription 2026-04-02 11:00:35 +11:00
subdirectory_hints.py feat: progressive subdirectory hint discovery (#5291) 2026-04-05 12:33:47 -07:00
title_generator.py feat(agent): configurable timeouts for auxiliary LLM calls via config.yaml (#3597) 2026-03-28 14:35:28 -07:00
trajectory.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
usage_pricing.py fix: status bar shows 26K instead of 260K for token counts with trailing zeros (#3024) 2026-03-25 12:45:58 -07:00