Files
cc-connect/core
5f7a558eda fix: codex mode switch not taking effect and --json flag position (#240)
Fixes issue #233 and #220.

## Changes

### 1. Fix /mode command not taking effect (Issue #233)

When switching mode via `/mode yolo`, the new mode was saved to the agent
but the existing session continued using the old mode. This caused YOLO
mode to not work until a new session was manually started.

Fix: Reset the session when mode changes, similar to how /model works.

File: core/engine.go

### 2. Fix --json flag position in codex exec resume (Issue #220)

The --json flag was placed before the thread_id positional argument in
`codex exec resume` command, causing "unexpected argument '--json'" error
on the second message in a session.

Fix: Move --json to the correct position after thread_id and before prompt.

Before: codex exec resume --json --skip-git-repo-check <tid> <prompt>
After:  codex exec resume --skip-git-repo-check <tid> --json --cd <dir> <prompt>

Files: agent/codex/session.go, agent/codex/session_test.go

Co-authored-by: Ubuntu <ubuntu@localhost.localdomain>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:32:52 +08:00
..
2026-02-28 10:38:24 +08:00