Skip to content

ShellTimeoutBudget

ShellTimeoutBudget = { ceilingMs: number; kind: "granted"; requested: boolean; timeoutMs: number; } | { ceilingMs: number; kind: "refused"; message: string; requestedMs: number; }

Defined in: packages/agent/src/tools/GthDevToolkit.ts:108

[[EXT-125]] — the outcome of resolving ONE call’s time budget, before anything is spawned.

A discriminated union rather than a number plus an out-of-band error, because the refused case must be impossible to use as a budget by accident: there is no timeoutMs on that arm to read.

{ ceilingMs: number; kind: "granted"; requested: boolean; timeoutMs: number; }

ceilingMs: number

The ceiling in force for this call, in ms.

kind: "granted"

requested: boolean

Whether the CALL named this budget, as opposed to inheriting the configured default.

timeoutMs: number

The wall-clock budget to arm, in ms.


{ ceilingMs: number; kind: "refused"; message: string; requestedMs: number; }

ceilingMs: number

The ceiling it exceeded, in ms.

kind: "refused"

message: string

The model-facing refusal to return INSTEAD of running anything.

requestedMs: number

What the call asked for, in ms.