Skip to content

Defer low-value native tools by default#2102

Open
Hmbown wants to merge 1 commit into
mainfrom
codex/issue-2076-defer-native-tools
Open

Defer low-value native tools by default#2102
Hmbown wants to merge 1 commit into
mainfrom
codex/issue-2076-defer-native-tools

Conversation

@Hmbown
Copy link
Copy Markdown
Owner

@Hmbown Hmbown commented May 25, 2026

Summary

  • Defer-load native tools outside the core catalog by default so ToolSearch materializes low-frequency tools on demand.
  • Add [tools] always_load = ["..."] config support to opt native tools back into the active catalog.
  • Add scripts/measure-tool-catalog.py for deterministic serialized catalog byte/token estimates.

Closes #2076.
Partially addresses #1253.
Partially addresses #1177.
Partially addresses #1747.
Partially addresses #1120.

Measurement

CARGO_TARGET_DIR=/Volumes/VIXinSSD/whalebro/target-codewhale-issue-2076 scripts/measure-tool-catalog.py

  • baseline: 79 tools, 55,985 bytes, ~13,997 tokens
  • active default: 16 tools, 14,795 bytes, ~3,699 tokens
  • reduction: 73.57%

Tests

  • CARGO_TARGET_DIR=/Volumes/VIXinSSD/whalebro/target-codewhale-issue-2076 cargo test -p codewhale-tui tool_catalog -- --test-threads=1
  • CARGO_TARGET_DIR=/Volumes/VIXinSSD/whalebro/target-codewhale-issue-2076 cargo test -p codewhale-tui non_yolo_mode_retains_default_defer_policy -- --test-threads=1
  • CARGO_TARGET_DIR=/Volumes/VIXinSSD/whalebro/target-codewhale-issue-2076 cargo test -p codewhale-tui --bin codewhale-tui tools_always_load_parses_and_trims_names -- --test-threads=1
  • CARGO_TARGET_DIR=/Volumes/VIXinSSD/whalebro/target-codewhale-issue-2076 cargo test -p codewhale-config tools -- --test-threads=1

Copilot AI review requested due to automatic review settings May 25, 2026 05:49
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Hmbown Hmbown force-pushed the codex/issue-2076-defer-native-tools branch from 6c9e6f3 to 6e64881 Compare May 25, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Defer-load low-value tools to shrink prefix-cache footprint

2 participants