Tools that activate only when an agent needs them
In Amplifier, each spawned agent names exactly the tools it needs. That declaration is stable. The open question is timing: does the parent session pre-activate everything up front, or does each tool come on only when it's actually used?
Start with what the agents themselves ask for.
The git-ops agent declares just two tools — tool-bash and tool-filesystem. The explorer agent declares a different narrow set. Agents genuinely want little.
So the appetite is small. The question is what it cost to satisfy it.
agents/git-ops tools: tool-bash + tool-filesystemexplorer tools: tool-filesystem, tool-search, tool-lspThe feature arrived in a single commit adding lazy module activation to BundleModuleResolver — small, localized, and real.
Small change, big shift. First, why it was needed.
amplifier_foundation/bundle.pyBefore lazy activation, any tool an agent might use had to be pre-activated in the parent bundle. Ask for one that wasn't there, and the resolver raised CoreModuleNotFoundError.
So parents over-provisioned — cluttering the root, over-granting tools, paying activation cost for tools that might never run.
Bundle.prepare() passes the ModuleActivator into BundleModuleResolver. A new async_resolve() lazily activates any declared module the first time a child session asks for it, using the source hint in the agent's tool config.
That one move changes where and when activation happens.
Bundle.prepare() constructs the resolver with activator=activatorsource hintasync_resolve() activates and adds the module on first useThe cost no longer sits in the parent's initial set. It shifts to exactly the agent that needs the tool, exactly when it needs it — guarded by a double-checked asyncio activation lock so concurrent spawns stay safe.
Which turns an abstract shift into a concrete, provable result.
Per the feature commit's own test description, an agent session obtained python-check and python-execute without the parent ever pre-activating them.
The parent gave nothing up front. The agent got exactly what it declared.
The parent stays clean. Agents get exactly the tools they declared — activated only when a child session actually asks. Nobody has to over-provision to be safe.
Shipped / present on current working branch
Feature status: Shipped / present on current working branch fix/session-naming-timeout-configurable (origin microsoft/amplifier-foundation).
Feature commit: dfbe1ce — authored 2026-01-14 16:41 PST, committed 2026-01-15 05:08 PST, by Brian Krabach <brkrabac@microsoft.com>.
Commands run:
git log --oneline --all -i --grep=lazy — located commit dfbe1cegit show -s --format='%an <%ae>' dfbe1ce — author attributiongit show -s --format='%ci' dfbe1ce ; git show -s --format='%ai' dfbe1ce — datesgit show dfbe1ce --stat — 1 file changed, 81 insertions(+), 8 deletions(-) in bundle.pygit show -s --format='%B' dfbe1ce — test description: 7 parent tools → 9 agent toolsls agents/*.md | wc -l — 16 agent definition filesgrep -c ' source:' agents/git-ops.md — git-ops declares 2 toolsgrep -n -A2 ' - module:' agents/explorer.md — explorer declares tool-filesystem/tool-search/tool-lspgrep -n 'async_resolve|class BundleModuleResolver' amplifier_foundation/bundle/_prepared.pyGaps: The 7→9 tool figure and the python-check/python-execute example are quoted verbatim from the feature commit's own message; the underlying test was not independently re-run. No standalone user-facing doc exists — the concept lives in docstrings and the commit message.
Note: bundle.py was later split into a bundle/ package on 2026-03-20; BundleModuleResolver and async_resolve now live in bundle/_prepared.py.
Primary contributor: Brian Krabach (author of commit dfbe1ce).