Skip to content

Restart app-server per workspace without full app restart (for account switching) #602

@usman661

Description

@usman661

Problem

When using multiple Codex accounts via a tool like Codex Switcher, switching accounts updates ~/.codex but does not affect already-running workspace sessions in CodexMonitor. Each workspace has a persistent codex app-server process started at launch with the original account. After switching accounts externally, all requests continue to use the old session and fail with usageLimitExceeded.

The only workaround currently is a full app restart (Cmd+Q and reopen).

Expected Behavior

A way to restart the app-server for a specific workspace from within CodexMonitor — either via:

  • A right-click context menu on the workspace
  • A button in workspace settings
  • Automatic detection of account changes in ~/.codex

Debug Log Evidence

Both workspaces return the same rate limit error after account switch:

"codexErrorInfo": "usageLimitExceeded"
"willRetry": false

Even after switching accounts externally, new turn/start requests go to the same exhausted session.

Suggested Fix

Add a Reconnect or Restart app-server option per workspace in the sidebar context menu. This would kill the current app-server process and spawn a fresh one, picking up whatever account is active in ~/.codex at that moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions