Documentation
¶
Overview ¶
Package limitstop tells, from the end of a harness's conversation record, that the agent's last turn stopped on a limit window (上限で止まった agent, #2101): the account's own limit refused the model call, and only the window's reset lets the agent go on. A server's passing rate limit, spend limits, credits and overage are not limit stops: no reset time ends them.
What each harness writes (PROTOCOL.md "Resume at reset"):
- Claude Code: a synthetic assistant line, isApiErrorMessage, apiError usage_limit_reached, apiErrorParams.rate_limit_info {rateLimitType, resetsAt (unix s)}; the window is named.
- Codex: event_msg task_complete (turn_complete) whose error.codex_error_info is usage_limit_exceeded; the windows are those at 100% in the token_count rate_limits before it.
- omp: the assistant message with stopReason error and the UsageLimit bit in errorId; only the provider is told.
- Antigravity CLI: an ERROR_MESSAGE step saying the quota ran out; only the model of the reply before it is told.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codex ¶
type Codex struct {
// contains filtered or unexported fields
}
Codex reads a Codex rollout as it grows; it keeps the windows of the newest token_count between reads.
func (*Codex) Feed ¶
Feed reads the complete lines appended to the rollout (b) and reports the last turn among them that ended refused by a usage limit. The windows are those at 100% or more of the token_count before it (none when it told none: the account's windows say). A token_count of a workspace's credits or spend limit (rate_limit_reached_type workspace_*) makes the refusal no limit stop; one of a limit other than codex's own (limit_id) is left out.
type Stop ¶
type Stop struct {
// Windows are the windows that ran out, with their reset, when the
// record names them (Claude Code, Codex).
Windows []usage.Window
// Provider is omp's provider of the refused reply ("anthropic",
// "openai-codex"): the account whose windows ran out.
Provider string
// Model is the model Antigravity CLI ran last: it names the quota
// group whose windows ran out.
Model string
}
Stop is a limit stop as the record tells it.
func Antigravity ¶
Antigravity reads the end of an Antigravity CLI transcript: its last step (Antigravity CLI's own notes aside) is an ERROR_MESSAGE about the quota. Model is the model of the last reply before it, if the tail has one.