feat: shrink default tool surface + cap memory files#39
Merged
Conversation
Split staticTools into coreTools (always on) and opt-in groups via MAX_TOOLS_BROWSER / LINKEDIN / IOS / LAUNCHPAD / SUBAGENT env flags (or MAX_TOOLS_ALL for legacy behavior). Tool schemas ship on every request, so this cuts baseline input tokens meaningfully when only core tools are needed. Also cap each memory file at MAX_MEMORY_FILE_CHARS (default 20K) with a warn log so an unbounded MEMORY.md or daily log can no longer silently bloat the system prompt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4d095e6 to
ac4975e
Compare
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
coreTools(fs, shell, ssh, nix-relay, gpu) stay on by default;BROWSER/LINKEDIN/IOS/LAUNCHPAD/SUBAGENTgroups are now opt-in viaMAX_TOOLS_<GROUP>=true(orMAX_TOOLS_ALL=truefor the old behavior). Tool schemas ship on every request, so this cuts baseline input tokens meaningfully when those groups aren't needed.MAX_MEMORY_FILE_CHARS(default 20K) inloadMemory, with a warn log and a visible truncation marker, so an unboundedMEMORY.mdor daily log can't silently bloat the system prompt.Part of the context-optimization series — see also #(PR1 ctx-ignore), #(PR3 lower compaction threshold), #(PR2 per-tool caps + stale pruning). PR 4 (Mux prompt caching) is next, in the
muxrepo.Test plan
npm run build— cleannpm test— 72/72 passTool groups active: core (9 tools)on startup with noMAX_TOOLS_*flags setMAX_TOOLS_IOS=trueand confirmios_*tools are registered🤖 Generated with Claude Code