Skip to content

rustgrid-agent v1.11.0

Choose a tag to compare

@github-actions github-actions released this 11 Nov 07:49
· 9 commits to main since this release
3adf8f2

rustgrid-agent v1.11.0

This release reports token usage, and the cost RustGrid derives from it, once
per model call while a cloud run's session is going, for both Claude Code and
Codex. The "Over time" graph now has a point for every call instead of a
single point at the end of the session.

Install or upgrade

brew update
brew upgrade RustGrid/tap/rustgrid-agent

Workers pick up the new version when they restart. There is no need to run
rustgrid-agent trace install again.

Changed

  • Claude Code runs report each API call. Claude Code repeats an API
    message's final usage on every record it streams for it. The worker reports
    it once per message, with the message's own model (subagents may use
    another), stop reason, and the service_tier, inference_geo and speed
    fields RustGrid prices by.
  • Codex runs report each response. codex exec --json prints usage only
    when a turn ends, and runs with --ephemeral, so the worker points Codex's
    OTLP/HTTP log exporter at a receiver it runs on 127.0.0.1 for the agent
    step. Each response.completed log becomes one model call stamped with the
    time Codex recorded it.
  • Totals still match billing. When a turn ends, the provider's aggregate
    usage is compared with the calls already reported. Anything they missed is
    reported as one more call. If the per-call source is unavailable, the
    turn's aggregate is reported as before.
  • Budget advisories can fire mid-session. Token counts now grow as calls
    complete, so the 70%, 90% and 100% advisories can appear during a session.
    Final totals are unchanged.

Security

  • The container image pins Claude Code 2.1.251, which fixes
    GHSA-5xjx-9qx6-jcrv (High) in 2.1.246. Operators running Claude Code in
    Docker Sandboxes should move executor.claude_template and
    executor.claude_version to a template with 2.1.251 or later.
  • The Codex usage receiver listens on loopback only and refuses requests
    without the step's token. It keeps token counts, model, service tier and
    timestamp, and drops the account and session details in Codex's logs. The
    token is redacted from commands the worker prints.

Compatibility

  • Works with the same RustGrid as v1.10.0. Session state and installed hooks
    are unchanged.
  • Docker Sandbox runs with Codex get one more network allow rule,
    localhost:<port>, scoped to the run's sandbox, so Codex can reach the
    receiver as host.docker.internal:<port>.
  • Each Codex turn waits up to 3 seconds at the end for Codex's last usage
    export.

Known limitations

  • A call Codex exports after its turn has ended is not reported on its own;
    its tokens are already in the turn's aggregate.
  • Per-call input sizes do not update the budget's peak context measure.
  • The sandbox allow rule is not removed after the agent step; a retained
    sandbox keeps it.
  • See known limitations.

Verification

The release candidate must pass formatting, strict Clippy, the full unit and
integration test suite, npm build, package verification, packaged-source
compilation, Homebrew formula syntax validation, and the version smoke test.

Rollback

Reinstall v1.10.0. Do not replace or mutate the v1.11.0 tag or release assets.