Skip to content

Hosted search usage causes premature auto-compaction #47825

Open

Description

@upman

Hosted Responses search reports billing usage in usage.input_tokens, usage.output_tokens, and usage.total_tokens, which can exceed retained context size.
Codex uses last_token_usage.total_tokens for context accounting: Calling a gateway with hosted search reports the entire search loop's token usage.

Codex assumes that count is the number of tokens in the context window.

Please separate billable token usage from context occupancy so hosted tool loops do not trigger premature auto-compaction.

Activity

  1. added
    bug
    context
    rate-limits
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcontextrate-limits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions