-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Bug] Active Ralph can become stranded across OMX session turnover in the same Codex session #1161
Copy link
Copy link
Open
Description
Summary
An active Ralph can become stranded in the previous OMX session scope when the same Codex session continues after OMX session turnover.
Environment
- OS: WSL2
- Node.js version: v22.21.1
oh-my-codexversion: local branch based onupstream/dev- Codex CLI version: 0.118.0
Steps to reproduce
- Start a Ralph run in one OMX session scope.
- Continue the same Codex session after OMX session turnover so the active Ralph remains in the previous session scope.
- Observe the new current session state and HUD behavior.
Problem detail
Today, the active Ralph can remain in the previous session scope while the current session does not see it.
That leaves the user in an inconsistent state:
- the old scope still owns the live Ralph state
- the new current scope may appear to have no Ralph
- the user may need to restart Ralph manually even though the Codex session itself did not actually change
Suggested behavior
One possible way to make this behavior consistent is:
- if the current authoritative scope is empty,
notify-hookmay adopt exactly one matching active prior Ralph into the current scope - if the current scope already has
ralph-state.json, it should remain authoritative for automatic reconciliation, even if that file is inactive or unreadable - explicit new Ralph starts should still work normally through the existing mode/state-write path
This keeps automatic recovery narrow and avoids silently reviving or overwriting Ralph state that already exists in the current scope.
Additional notes
I will open a PR alongside this issue from fix/ralph-same-session-current-session so the proposed behavior and test coverage can be reviewed directly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels