Skip to content

fix(skills): bound fallback supporting file scan#18677

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/skill-supporting-files-scan-cap-18675
Open

fix(skills): bound fallback supporting file scan#18677
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/skill-supporting-files-scan-cap-18675

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Fixes #18675.

Summary

  • replace the unbounded fallback rglob("*") supporting-file scan with a deterministic scanner that prunes dependency/cache directories before descent
  • cap supporting-file hints at 200 entries and emit a truncation note outside the file-path list
  • skip empty files in the fallback scan
  • add regression coverage for nested node_modules, empty files, and the 200-file cap

Verification

  • scripts/run_tests.sh tests/agent/test_skill_commands.py::TestSkillDirectoryHeader::test_fallback_supporting_file_scan_skips_dependency_dirs_and_caps
  • scripts/run_tests.sh tests/agent/test_skill_commands.py
  • git diff --check origin/main...HEAD

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder tool/skills Skills system (list, view, manage) labels May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: _build_skill_message fallback rglob can inject thousands of files into context from nested dependency dirs

2 participants