Files
hermes-agent/hermes_cli
joaomarcos a6c0803f59 fix(web_server): stop Codex OAuth worker from finishing after cancel
Cancelling a pending OpenAI Codex device-code login only popped the
session dict; the background worker had no way to observe the
cancellation and kept polling, exchanging the code, and saving tokens
regardless. Once the session was gone, _oauth_session_profile()
returned None and the save fell back to the caller's current profile
scope instead of the profile the login was started in.

Fix: cancel_oauth_session marks the dict cancelled=True before
popping it, and _codex_full_login_worker (which holds a reference to
the same dict object) checks that flag before every remaining
sleep/poll, before the token exchange, and before saving. The profile
is captured once up front so it can never be re-derived from a
session that no longer exists.
2026-07-29 02:27:53 -03:00
..
…
2026-07-27 11:53:48 -04:00
2026-07-27 11:53:48 -04:00
2026-07-27 11:53:48 -04:00