Refine across turns
Work a multi-step change with several Fuse calls in one task, sharing a session so unchanged files are not sent twice.
Goal: work a multi-step change that needs context from several areas of a codebase without paying tokens twice for files an earlier call already returned.
The lever is a shared session: pass the same sessionId to every call in one task and
Fuse omits files it already sent unchanged. See
Sessions and deltas for the mechanism.
Do It
Pick a session id for the task and reuse it across the call sequence. Here an agent works a change to checkout pricing that spreads from the order service into the pricing rules.
# 1. Survey the index, cheaply, to orient.
fuse_workspace(action="map", path="C:/Projects/MyApp/src", detail="all")
# 2. Plan context for the order service and its dependencies.
fuse_context(path="C:/Projects/MyApp/src", seeds=["OrderService"],
depth=1, sessionId="checkout-pricing")
# returns OrderService.cs, Order.cs, IOrderRepository.cs, PricingPolicy.cs
# 3. Plan context for the pricing rules, which share PricingPolicy with step 2.
fuse_context(path="C:/Projects/MyApp/src", seeds=["PricingPolicy"],
depth=1, sessionId="checkout-pricing")
# returns DiscountRule.cs, TaxPolicy.cs
# note: omitted 1 file already sent this session: PricingPolicy.cs
# 4. Review the branch once the change is made.
fuse_review(path="C:/Projects/MyApp/src", changedSince="origin/main",
sessionId="checkout-pricing")Step 3 returns only the files the agent does not already hold; PricingPolicy.cs arrived
in step 2 and is skipped, with a note saying so. Step 4 scopes the review to the branch and
shares the same session, so the changed files it has not sent before arrive while anything
already delivered is elided.
Run a Two-Turn Check
Reuse one sessionId in two fuse_context calls with overlapping seeds. Read the
omitted-file note in the second response. Then edit one omitted file and call again; the
changed content should be returned instead of elided.
Ask one question
Get the answer to a single question about a .NET codebase in one call: localize an open-ended question, or resolve a named piece of wiring.
Scope a pull request
Review only the files a branch changed plus their blast radius, the callers, DI consumers, request and route handlers, options consumers, and tests, in one call.