## Why
Statsig starts before the model catalog. When runtime agent instances are
enabled, separate auth managers can cause Statsig and model discovery to
register the same app-server runtime twice.
## What changed
Pass a shared runtime auth slot to Statsig and model discovery in both
standalone and in-process app-server startup so they use the same runtime
registration.
## Testing
Extend the CLI startup integration test to require exactly one runtime
registration and verify that both Statsig evaluations and model discovery
send `AgentAssertion` authorization headers.
GitOrigin-RevId: 132521b685c5c7c617e7067c648de65b9a4287b2
After observing the expected Statsig request, drop the child session
before awaiting its exit. This uses the process handle's existing
cleanup to terminate the child and stop its I/O tasks.
GitOrigin-RevId: 17be552b74f7539ab46bbb4cb9dfa3bf9697ee08
## Why
Enabling `statsig_gates` can only load evaluations if the process starts
the Statsig runtime. Several Codex entry points never started it.
## What changed
Start Statsig in standalone and embedded app servers, the TUI when it
connects to a separate app server, eligible `codex sandbox` launches, and
local and remote exec servers. This also covers `codex exec` through its
embedded app server. Use the serving or local account where applicable
and installation identity for remote execution. Share the runtime with
the embedded TUI and flush it on normal shutdown.
## Testing
Add a CLI integration test that checks which evaluation endpoint each
launch mode requests, including signed-in and signed-out sandbox launches.
Supply a bundled fixture key in Bazel and nextest CI builds so the test runs.
GitOrigin-RevId: 64df9933c1a9783a86be8712fa012b495f34b0f8