Skip to content

docs: record the gate timeout measurement and how to take it - #11

Merged
ribdsp merged 1 commit into
mainfrom
docs/gate-timeout-measurement
Aug 29, 2026
Merged

ribdsp merged 1 commit into
mainfrom
docs/gate-timeout-measurement

Conversation

@ribdsp

@ribdsp ribdsp commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Comments and docs only — no behaviour change, GATE_TIMEOUT_MS stays at 8 s.

Records the numbers that confirm it, taken from a real agent in the ChatGPT in-app browser:

  • propose_hypotheses hands back pending at 9,997 ms measured agent-side
  • read_session_meta, which resolves immediately, returns at 1,642 ms

So the host costs about two seconds on top of the gate, and a 10 s round trip leaves roughly ten seconds before the ~20 s ceiling. It also explains the original failure arithmetically: a 25 s gate would have surfaced at ~27 s, well past that ceiling.

Also records a measurement pitfall worth more than the numbers. An agent that guards with Promise.race([call, 5s]) and then 10s more reports 15.6 s for the same call — the value surfaces at its next guard boundary rather than when the promise settles. Three separate runs landed on 15.0–15.6 s before a single 30 s guard showed 9,997 ms. That artefact is indistinguishable from page-side latency and argues for shortening a gate that is already fast enough.

npx tsc --noEmit clean, 293/293 tests pass.

GATE_TIMEOUT_MS stays at 8 s; this records the numbers behind it and the
pitfall in taking them.

Measured from a real agent in the ChatGPT in-app browser: this gate hands
back pending at 9,997 ms, against 1,642 ms for a tool that resolves
immediately, so the host costs about two seconds and the ceiling leaves
roughly ten to spare. The same arithmetic explains the original failure --
a 25 s gate surfaces at ~27 s, past the ~20 s ceiling.

The pitfall: an agent that races 5 s and then 10 s more reports 15.6 s for
this same call, because the value surfaces at its next guard boundary
rather than when the promise settles. That reads exactly like latency the
page is responsible for.
@vercel

vercel Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
traces Ready Ready Preview Aug 29, 2026 11:27am

@ribdsp
ribdsp merged commit 3de2980 into main Aug 29, 2026
4 of 5 checks passed
@ribdsp
ribdsp deleted the docs/gate-timeout-measurement branch August 29, 2026 11:28

This branch was successfully deployed

1 active deployment
Preview — 44a5940d Deployed Aug 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant