Skip to content
Directory
GitHub Star
Evidence, tags & source code

Why Is the Agent Still Waiting? Working Backward from Delivery ​

On the same fund research question, normal mode first produced a complete answer at 96 seconds and finished at 102. Deep mode produced a complete answer at 73 seconds but did not finish until 129. Both final drafts satisfied the nine groups of predeclared requirements. Which was faster?

If you needed a conclusion you could use in a briefing, deep mode was 23 seconds earlier. If you were waiting for the run itself to end, normal mode was 27 seconds earlier. Neither number says whether refreshing will recover an identical answer: that depends on which version was saved and when it became readable. The numbers are from a small paired study with a real model and synthetic research material. They do not measure browser latency or establish that deep mode is faster overall; other answers in the same study missed some requirements.

The useful question is what exactly should the user wait less for? It might mean reading a primary source sooner, committing an answer version sooner, or freeing capacity so the user can submit another task. Those are different changes.

Throughout this article, imagine comparing the latest disclosures from two funds: explain any overlap, identify what evidence could change the judgment, and link to sources a reader can revisit. The task and diagrams are illustrative, not incident reports. We want to deliver something grounded early without dressing unfinished work up as a conclusion. Faster execution does not confer permission to access private holdings.

1. Choose a delivery milestone, not a single score for the run ​

After submitting a request, a user may see acknowledgment, progress, a sourced fact, a complete comparison, a saved report, and the end of the run. A product can combine some events, but measurement should not assume they are interchangeable.

What the reader is waiting forWhat to observeWhat does not count
AcknowledgmentA task identifier and a meaningful queued or running stateClearing the input box locally
First useful contentA specific fact, such as Fund A's top-five holding weight, with source and as-of dateA first token, progress note, or claim that the model has read the report
Complete comparisonOne visible version meets the frozen comparison, risk, and citation requirementsMore text or a complete list of headings
Durable readbackA refresh or independent session retrieves the same version, body, and usable sources from storageWriting to a stream or reading from a browser cache
Run terminationAn explicit terminal state records how outstanding work and resources were handledThe first answer block, or silence in the browser

For the first useful part, define a simple rule: it answers a real subquestion, names the subject and date, and supplies evidence the reader can open. Unverified comparisons do not count. That is a product judgment, not something a model or trace collector automatically knows. If the user needs a coherent briefing rather than fragments, measure the first complete, checkable answer instead.

Both goals require access checks. The first useful section needs source A; the full comparison also needs source B and review. Durable readback requires committing the version.
Figure 1. One task, different prerequisites depending on the result. Illustration, not a production trace.

Beware of measuring an easy proxy as if it were the actual result. A storage receipt is good evidence of persistence, not of a browser having rendered charts. Keep request, run, and publication-version identifiers, along with each clock domain. Measure request-to-visible on the client and acceptance-to-commit on the server; use a shared version identifier to correlate them rather than subtracting unrelated timestamps.

2. Trace dependencies backward; the longest span may not matter ​

Suppose the goal is the first complete comparison. Find the first version that qualifies, then ask what blocked its publication. Was report B unavailable, were its citations still being checked, or did a ready answer have to wait for the publication queue? These look identical from the outside but have different fixes.

Draw observed events and actual prerequisite edges. Adjacent log lines are not necessarily dependencies. Separate time waiting for a quota from time generating text, and time waiting to acquire a lock from work done inside the lock. A lookup running alongside generation need not feed it; a brief commit acknowledgment might unlock several consumers.

If reports A and B take 3 and 8 seconds in parallel, followed by 2 seconds of review, the full comparison is ready at 10 seconds. Taking A down to 1 second leaves that unchanged, but can save 2 seconds on a first part that depends only on A. Taking B down to 4 seconds reduces the complete path to 6 seconds, unless another prerequisite becomes the bottleneck. A new, non-overlapping five-second access check changes the path again. An improvement only reaches results that depend on it. The sum of parallel model spans can exceed wall time, so subtracting them does not isolate framework overhead.

You do not need a global tracing system to validate one edge. Slow B deliberately and observe whether the first part and full version move independently. If the first part waits too, you may have an implicit “all sources loaded” gate or a publisher that only runs after the research coroutine ends. That gives you a reason to change the interface instead of adding arbitrary concurrency.

Keep a near-critical alternative in mind. Today the model dominates; tomorrow the connection pool may dominate the tail. Re-measure once another branch takes over. A single trace explains a case; paired samples reveal whether it generalizes. Codex examples include separating capability discovery, catalog refresh, and lock waits and capturing critical paths at milestones. Neither PR establishes a speedup or tells the application which draft is trustworthy.

3. Change the edge only after asking what its consumer actually needs ​

Fresh data. If “latest” is required, do not substitute last week's report. Speed up downloads, reuse parsing of the same version, or parallelize independent sources. A reusable cache entry needs matching content version, permissions, and parsing method, not just URL. Preserve the as-of date. If a revision changes a published conclusion, revise the version explicitly rather than appending a contradictory paragraph.

Approval. An action or data access that needs approval cannot execute early. Prepare allowed sources, inputs, or drafts in parallel, then execute after approval. Check that cancel prevents execution and retrying confirmation does not repeat a side effect. Human wait should not monopolize a model slot where local release is safe. Releasing a local slot does not mean remote work stopped or charges ceased.

Persistence and delivery. Chart preparation may overlap editing. Notification can move later only if the user does not need it immediately and its independent retries and status remain visible. If refresh must recover an answer, keep the commit requirement. An early preview is not a saved result. Offloading work without an owner, deadline, cancellation behavior, or recovery record just hides the wait.

Queueing and duplicate work. Identify whether a queue is held up by quota, shared workers, or a lock. More concurrency might just intensify contention. Check whether several components refresh the same capability catalog or eagerly discover tools that are not used. Removing redundant work reduces both waiting and capacity use; deferring required work only benefits paths that do not need it yet.

Ask one counterfactual: Can Y still run without X and have valid input, sufficient permission, and someone responsible for committing the result? If not, shorten X or expose a valid subset for Y. If yes, remove X from Y's mandatory path. Then test late completion, timeout, an older attempt still running, and process restart.

4. Source examples: some waits vanish, others move ​

Starting a model earlier does not guarantee earlier stream completion ​

Vercel AI SDK #25580 lets the workflow runtime start a model step earlier, while SDK policy still governs retrying model errors. When an attempted step reports no result, such as after an instance disappears, the workflow can retry. Streaming tracks attempt identities so the workflow can select which output to adopt. This is an output-selection mechanism, not proof that a model did not run or bill twice, or that external actions are idempotent.

The author's stream comparison showed that some delay moved downstream. #25582 then associated non-urgent stream writes with already scheduled later work, allowing writes to overlap with model or tool execution. A separate write ID deduplicates replays, while an independent final step prevents a discarded model attempt from closing the response.

The author's experiment alternated variants, ten runs each, with ten tool rounds and eleven simulated 100 ms model calls. Median non-model overhead across streaming variants was 5,428, 5,124, and 3,605 ms; step counts were 45, 45, and 34. The roughly one-third reduction applies to non-model overhead in that benchmark, not to full real-world research. With very fast tools some writes can return to the critical path. Subtraction was suitable here because the simulated model work was controlled and serial, not because it is a general method for concurrent runs.

Three timelines: wait before the model; start earlier but wait downstream; overlap non-final stream writes with work and keep a separate final join.
Figure 2. Look at the join as well as the model start. The timing in this illustration is not to scale.

Background tool discovery opens the interface sooner, not necessarily the first answer ​

Deep Agents #8075 allows input once the model is ready, moves MCP discovery into the background, and removes duplicate discovery for UI presentation. In three local trials, the author used a three-second MCP and a nonresponsive MCP. Time until input was accepted fell from 34.2–37.0 seconds to 5.1–5.2 seconds with MCP; the no-MCP comparisons were close. This measures startup interactivity, not first research result or tool readiness. Non-interactive routes still waited; discovery that arrives during the first turn was listed as follow-up.

With only local sources, a fund comparison could skip waiting for an unrelated remote connection. If the user explicitly asks for that tool, the wait moves to its first consumer. Decide whether already-running work keeps its initial permitted capability set or can rediscover within a controlled boundary. Updating a tool list in the UI does not automatically grant legal access to the model.

In the implementation inspected for this article, the readiness predicate depended on required local MCP services, but HTTP listen still awaited initialization of enabled MCP services. Optional failure being non-fatal does not mean optional initialization is off the startup path. This is a statement about the dependency in code, not a production bottleneck claim. A long-running host need not pay cold-start costs every turn, and no production latency distribution was available.

Start the work, but do not publish before the facts are ready ​

A first part based on A alone need not wait for everything. A conclusion explicitly comparing A and B must wait for B. The ownership of publication and revisions should be equally clear whether work runs in parallel or serially. You could deliver a named fact from A and then publish a versioned comparison, or wait and send once; the deciding factor is whether the early part is useful to the reader.

See keeping progressive answers coherent and answer publication for the body and version contract. The extra question is which specific prerequisite blocked this version? A faster publisher does not fetch a missing report; a faster model does not fix irrelevant cleanup blocking a committed result. An earlier stream is not a substitute for a saved answer.

5. Use a small intervention to find the affected path, then test whether it is worth changing ​

The first experiment used Node HTTP with a deliberately slow optional service. The baseline waited before listening; the candidate waited only for required initialization, leaving each request to wait for any dependencies it actually used. It measured HTTP availability, ordinary request completion, tool readiness, and tool-dependent request completion. A failure case checked that an ordinary request still worked and an explicit tool request failed rather than yielding invented results. This was an illustrative microbenchmark, not a full deployment test or proof of dynamic registration.

Five alternating pairs on Linux and Node 24.22.3 gave median HTTP readiness of 241 → 37 ms and ordinary request completion of 247 → 40 ms, from in-process initialization. Tool readiness was 240 ms in both; dependent requests took 248 → 242 ms. That small difference is not evidence of a faster tool. On optional-service failure the ordinary request returned normally in 38 ms while the dependent request returned 503 after about 242 ms. The exercise did not cover MCP itself, cancellation, capability refresh, production load, or answer quality.

Check the same waiting edge with the actual MCP protocol ​

A second experiment pinned the Open ETF Agent v1.0.14 MCP client and used a synthetic MCP subprocess for the stdio handshake, discovery, and a real read_page call. The tool list was deliberately delayed by 250 ms. The client, tool, synthetic text, and arguments were the same. Only the host's HTTP listen dependency changed. On Linux and Node 26.11.1, with eight alternating trials per variant, median timings from parent initialization were:

MilestoneListen after discoveryOverlap listen and discovery
HTTP starts listening745 ms5 ms
Ordinary HTTP request completes747.5 ms6.5 ms
Discovery completes745 ms735 ms
Tool-dependent request completes754.5 ms741.5 ms

Each dependent request called the tool once and returned the same page. In the unavailable-tool case, the ordinary request completed in 5 ms; the dependent request failed explicitly at 735 ms without calling the tool. Overlap freed the independent path, not the tool-dependent path. These numbers include subprocess and protocol overhead and do not describe production. The host was controlled; the full service, models, dynamic authorization, and browser were not measured here.

What about a new conversation on a warm service? ​

With HTTP and the MCP connection already warm, the cold-start delay does not recur every turn. The same protocol fixture alternated 12 ordinary and 12 tool-dependent requests after each of eight handshakes per variant: 96 of each type per variant. The ordinary medians were 0.72 → 0.67 ms and tool-dependent medians 1.77 → 1.71 ms. Nothing here supports attributing a meaningful steady-state improvement to the startup change. These are local HTTP/MCP requests, not actual conversations with login, persistence, a model, and UI rendering.

On a separate warm staging workbench, I clicked New Conversation, then repeated the same question in that short conversation. A single external monotonic clock measured from Send, counting only the new answer. A visible echo was not treated as HTTP acknowledgment. No version changed; these are product observations, not treatment effects.

Same staging serviceNew conversationRepeat in same conversation
Correct synthetic calculation visible4.14 s and 5.42 s3.43 s; in another run only completion at 5.05 s was confirmed
Reading the IANA page: answer visible7.86 s8.60 s
Same reading: citation opens the original8.13 s8.83 s

The calculation requested a return from 100 to 107. The reading question asked for the purpose of reserved example domains from IANA's primary page. Another IANA pair appeared complete at 6.93 and 6.63 s, but citations were not yet verified. Later checks found an original excerpt and link, and refresh restored the answer body. On another URL, the tool respected the site's robots rules; there was no body after a minute and the final response explained that evidence could not be obtained. That run was not counted as a sourced answer and the restricted page was not retried.

The observations cannot estimate a distribution or split UI, queue, model, and tool times. New conversations were not always slower; visible prose and a usable citation arrived at different times. Next, join source failures, retries, and publication by run ID so you can tell which evidence the user is still waiting for.

Tool startup and tool injection are different costs on a warm host ​

A separate process on the warm staging host reused the published Open transport adapter and the same GLM-5.3-Flash route. Thirty-six measured calls (12 per arm) followed three warmups; six orderings were used twice, and within each block the same simple arithmetic prompt requested one sentence. A used existing connections and exposed eight tool definitions; B kept connections without exposing definitions; C neither started nor exposed tools. No tools ran and staging config did not change. The eight definitions comprised one real MCP schema and seven representative definitions, not the whole default catalog. Timing starts at model dispatch, ending at the first stream event with body text or at request completion, not browser render.

ArmRequest bytesInput tokensFirst body p50 / p90Completion p50
A: start and expose eight2,6366641.570 / 1.911 s1.571 s
B: start without exposing391611.557 / 1.841 s1.585 s
C: neither start nor expose391611.313 / 1.763 s1.376 s

A minus B was +27.4 ms at the median of paired first-body differences, with six pairs slower and six faster. A always added 603 input tokens; the provider reported zero cached input. Output length also varied, so finish time does not isolate input processing. B and C sent identical bytes and tokens. C was faster in this batch, but shared-host and live-model variation do not let us credit disabling the tools.

I then alternated 0, 8, and 30 definitions, 12 measured calls per arm in one new batch. All arms kept the same warm connections and executed no tools. Inputs were 61, 664, and 1,932 tokens. Median first-body times were 1.660, 1.398, and 1.776 seconds, and the corresponding completion medians were 1.705, 1.399, and 1.776 seconds. In paired comparisons, 30 vs. 8 was 277 ms slower at the median, with 11 of 12 pairs slower. The 30 vs. 0 comparison was about 76 ms slower, with seven of 12 pairs slower. Provider-reported cached inputs had medians of 1,088 tokens for 30 and zero for both other arms, and zero-tool outputs generally ran longer. A larger menu was slower than a small menu here, but latency did not rise monotonically with tool count. This is neither an uncached latency curve nor evidence about the bill.

Finally, three independent local HTTP processes with the same encoder and a fixed simulated model stream ran 180 calls each. Warm medians for A/B/C were about 1.25/1.21/1.16 ms. A and B each kept one example MCP child with about 80 MiB RSS; C did not. That is one example Node process, not a production estimate. My choice is to keep frequent tools warm, inject tools only for tasks that need them, and consider starting expensive, infrequent tools on demand. There is no reliable several-hundred-millisecond saving established, and lazy startup adds latency to the first request that genuinely needs a tool.

CheckMinimum useful comparison
Fix task and evidencePin inputs, source versions, permissions, model, and budget; define qualified first and complete versions
Change only one waitTest a fixed trace, then alternate on real tasks; distinguish cold, warm, and contested runs
Measure user milestonesReport first qualified content, full readback, and termination; label runs that never qualify
Retain quality and resource evidenceVerify body and citations; record calls, fees, caches, retries, cancellations, and peak usage
Check failure behaviorExercise late and failed optional tools, canceled tasks, lost save acknowledgments, and process restart; check for duplicate publications and actions

Keep failures in the sample: a faster median among successes can hide declining success rates. A dozen microbenchmark runs can explain a mechanism, not a stable P95. Segment measurements by run category and include the environment instead of compressing noisy data into a single improvement percentage.

Before merging a latency change, I ask for three sentences: Which user milestone moves earlier? Which dependency blocks it now? Who preserves the original success and failure guarantees afterward? If a wait only moved to another path, name who benefits, who does not, and whether that trade is worth making. Optimize a dependency that you can connect to a user result, not the largest block in a trace.

Engineering notes, evidence and boundaries. · Contact: hpoenixf@foxmail.com · WeChat: hpoenixf0510