You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refresh the short-lived bearer used by the Codex UserPromptSubmit policy hook immediately before each native Codex turn.
Keep the last token if refreshing is temporarily unavailable, so a brief control-plane problem does not erase a credential that may still work.
Cover both the credential helper and the real runner message-dispatch path.
ELI5: Codex could look online while rejecting every message because its internal security pass had gone stale after the server restarted. The runner now gives that security check a fresh pass before every message.
pre-commit run --all-files was also run. All backend checks passed; the existing frontend tree triggered unrelated Prettier rewrites, which are intentionally excluded from this backend fix.
Demo
N/A — non-visual runner authentication fix.
Type of change
Bug fix
Feature
UI / frontend change
Refactor / chore
Docs
Test / CI
Breaking change
Test coverage
Unit tests added / updated
Integration tests added / updated
E2E tests added / updated
Manual verification completed
Existing tests cover this change
Not applicable
Coverage notes
The integration test submits a message through the real runner event endpoint and verifies the policy bearer is refreshed before the Codex harness receives the turn.
Changelog
Codex messages continue working after Omnigent restarts because their policy credentials are refreshed before each turn.
CI note: the server-rest shard reports four failures, but all four reproduce unchanged on the current main commit (7bedbc87) when run directly:
three session-snapshot assertions that do not yet account for the existing /models request;
the pre-existing generated openapi.json drift.
This PR changes only omnigent/runner/app.py and its runner regression tests. Its focused auth suite passes (17 tests), the runner-app shard passes, and the security, pre-commit, Windows, Docker, and related integration checks are green. I am recording the baseline reproduction here so the admin merge decision is explicit and auditable.
Additional CI note: the UI E2E failures are also outside this PR and reflect the Tellimer fork defaults versus upstream test expectations. The failures expect the default theme and navigation text to say Omnigent / System, while the fork intentionally renders Tellimer, Agent Platform, and the Tellimer theme. No web file is changed by this PR; the remaining Codex, runner, security, Docker, and backend matrices are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
N/A
Summary
UserPromptSubmitpolicy hook immediately before each native Codex turn.ELI5: Codex could look online while rejecting every message because its internal security pass had gone stale after the server restarted. The runner now gives that security check a fresh pass before every message.
Test Plan
pre-commit run --files omnigent/runner/app.py tests/runner/test_app_sessions_native.pypytest -q tests/test_codex_native_hook.py tests/e2e/test_managed_runner_http_auth.py tests/runner/test_app_sessions_native.py::test_codex_message_refreshes_policy_auth_before_harness_dispatch tests/runner/test_app_sessions_native.py::test_codex_policy_hook_snapshot_refreshes_before_turn tests/runner/test_app_sessions_native.py::test_codex_policy_hook_refresh_retains_snapshot_when_mint_fails tests/runner/test_app_sessions_native.py::test_claude_permission_hook_snapshot_refreshes_without_binding_token(17 passed)pre-commit run --all-fileswas also run. All backend checks passed; the existing frontend tree triggered unrelated Prettier rewrites, which are intentionally excluded from this backend fix.Demo
N/A — non-visual runner authentication fix.
Type of change
Test coverage
Coverage notes
The integration test submits a message through the real runner event endpoint and verifies the policy bearer is refreshed before the Codex harness receives the turn.
Changelog
Codex messages continue working after Omnigent restarts because their policy credentials are refreshed before each turn.