Workflow tool eager-loads ~4k tokens despite being opt-in/explicit-trigger only — defer via ToolSearch or add a toggle
Summary
The Workflow tool loads its full schema eagerly on every session, despite being opt-in / explicit-trigger only. Its description is by far the largest single tool in the default set — roughly ~3.5–4k tokens (estimated) of pattern catalog, code examples, and orchestration docs — yet the tool's own instructions bar it from being called unless the user explicitly opts in ("use a workflow", "ultracode", a workflow skill, etc.).
The inconsistency
Workflow is the ideal deferral candidate precisely because it's never chosen proactively:
- Tools reached for unprompted every turn (
Bash/Read/Edit) must be eager. Workflowis only ever invoked after the user signals intent — the perfect moment to load its schema on demand viaToolSearch, exactly likeWebFetch,WebSearch,EnterWorktree, and MCP tools already do.
Deferring it costs ~zero capability (proactive awareness is disallowed anyway) and reclaims more context than any other single tool.
Ask
Move Workflow behind ToolSearch deferral (name-only until loaded), or expose a disable/defer toggle in settings.json. There is currently no user-facing lever: the eager-vs-deferred partition for built-ins is hard-coded, and no disabledTools/deferredTools key exists.
Precedent / refs
- The deferral mechanism already exists — built-in tools got it in v2.1.69 (#31002); MCP tools support
defer_loading/alwaysLoad. - #76372 — same class (eager built-in tool schemas, no opt-out); asks to "defer via ToolSearch or expose a toggle." Covers the principle but not this tool.
- #45332 — analogous "extend deferral" request (plugin skills), closed by stale-bot without a decision.
3 Comments
This seems like an easy fix, right? Built-in tools used to be deferrable, now there's a hidden, hard-coded "do not defer these" list which includes _the biggest context-hog tools_; so, make that list of never-deferred tools configurable, ezpz.
There is a user-facing lever for this: turning off dynamic workflows removes the Workflow tool (and its schema) from the session entirely, so it no longer costs context.
/config→ toggle Dynamic workflows off (persists), or"disableWorkflows": truein~/.claude/settings.json, orCLAUDE_CODE_DISABLE_WORKFLOWS=1in the environment.Docs: https://code.claude.com/docs/en/workflows#turn-workflows-off
Deferring it behind ToolSearch instead of removing it isn't something that's available today, but since the toggle covers the "opt out of paying for it" ask, I'll close this. Reopen if you specifically need the deferred-but-loadable variant.
🤖 Generated with Claude Code
@bcherny The real issue is that Artifact alone takes 12K tokens. I understand Anthropic charges for tokens, but putting whole f*cking skill into tool description is insane