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
{{ message }}
Repository navigation
setup --cwd and status --cwd read broker state from the invocation directory instead of the target workspace #30
setup --cwd <path> and status --cwd <path> can report the wrong session runtime because broker state is resolved from the current process directory instead of the target workspace.
Reproduction
Start or persist a shared broker session for workspace A
Observe that both commands can report direct startup
Run the same commands from inside workspace A
Observe that they report shared session
Root Cause
The --cwd-aware callers resolve the target workspace correctly, but then call getSessionRuntimeStatus(...) without passing that resolved workspace through, so the helper falls back to process.cwd().
Affected paths include:
plugins/codex/scripts/codex-companion.mjs
plugins/codex/scripts/lib/job-control.mjs
plugins/codex/scripts/lib/codex.mjs
Impact
Cross-workspace invocations can lie about whether a shared Codex runtime is active.
This makes debugging broker reuse confusing.
Any tooling that shells into one directory while targeting another can get misleading status output.
Suggested Fix
Thread the resolved workspace root into getSessionRuntimeStatus(...) everywhere --cwd is supported, and add regression coverage for invoking setup and status from a different directory than the target workspace.
Activity