Skip to content

Harden against mixed collaboration mode instructions from Codex CLI #330

@Allmight97

Description

@Allmight97

Summary

When resuming threads that have switched between collaboration modes (plan ↔ code), Codex CLI sends mixed/conflicting mode instructions to the model. This causes the model to see both plan and code mode templates simultaneously, leading to confusion visible in reasoning traces, and (possibly) issues in plans displaying (hidden entirely or displayed in visible quote blocks).

Image

This is a known Codex CLI bug - we're tracking whether to harden CodexMonitor against it regardless of upstream fix.

Decision (I can work it if you want tackle)

  • Tackle now - Implement lightweight hardening that's defensive regardless of upstream
  • Wait - Monitor upstream PRs (#10254) and revisit if fix doesn't land soon

Upstream Status

Reference Status Description
#10185 OPEN Root bug - mode switch Plan→Code still behaves like Plan
#10254 OPEN PR Fix for backtrack + developer instructions sync
#10545 MERGED Improved mode prompts to reduce confusion
#10570 OPEN Our report - linked to #10185

Should CodexMonitor Harden Against This?

Consideration Assessment
If they fix it Our hardening becomes a no-op (defensive code that doesn't hurt)
If they don't fix it CodexMonitor provides better UX than raw Codex
If fix is partial CodexMonitor catches edge cases they miss
User perception CodexMonitor "just works" regardless of upstream bugs
Maintenance cost Low - simple filtering/UI logic

Potential Approaches

  1. Mode state tracking - Track mode locally, inject clarifying instruction on resume if history shows mixed modes
  2. UI indicator - Warn user when thread has mode switch history
  3. Fresh mode injection - On thread resume, send developer instruction reinforcing current mode
  4. Display filtering - Don't surface stale mode instructions in UI

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