Skip to content

feat(codex): add mode controls, live status, and bound collaboration mode (PR 1/3)#2

Closed
SYU8384 wants to merge 9027 commits into
mainfrom
feat/codex-plan-controls-foundation
Closed

feat(codex): add mode controls, live status, and bound collaboration mode (PR 1/3)#2
SYU8384 wants to merge 9027 commits into
mainfrom
feat/codex-plan-controls-foundation

Conversation

@SYU8384

@SYU8384 SYU8384 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

Draft of the Codex channel-native session controls sub-PR 1.

This branch cherry-picks the 43 Codex codex-plan-controls commits from
origin/feat/codex-plan-controls (the PR 88446 history) onto main,
plus 2 fixup commits for the two pre-existing PR bugs the cherry-pick
exposed. One Codex commit (b881e41 chore: drop local repro and proof-state artifacts) is dropped — it only deletes local scratch
files that don't belong on a public branch.

The a4fc8fa and 34b681e commits are applied as their original
cherry-picks (the demo-widget-removal half of 34b681e was a no-op
because the widget files no longer exist on main).

What's in this branch

  • Codex mode controls (/codex plan|think|live|permissions|status) and
    /codex model setter with bound conversation-target preservation.
  • Mode-specific reasoning-effort defaults without adding new config
    or env surfaces.
  • Bound-turn collaboration mode + reasoning effort + live progress
    persistence
    in CodexAppServerThreadBinding and the Codex runtime
    options shape.
  • Auth-reconcile fixes for OpenAI / Codex-default / OpenAI-native
    profile fall-through.

Fixups applied on top of the cherry-pick

  • ea3c4d9a8b fix(codex): restore closing paren in dispatch-from-config before_dispatch hook — the original 15eda36 commit removed a
    closing paren in src/auto-reply/reply/dispatch-from-config.ts:2112
    when it added the before_dispatch arrow-function body. This breaks
    the traceReplyPhase call. Verified via
    git show 15eda36fa8:src/auto-reply/reply/dispatch-from-config.ts
    that the bug is in the original PR.
  • bf868c7e32 fix(codex): guard channel in before_dispatch freeform answer handler — the original 15eda36 commit added
    channel: event.channel ?? ctx.channelId in
    extensions/codex/index.ts:186 where the helper requires a non-null
    string. The current branch has an explicit if (!channel) return;
    guard; this fixup restores it. Also reformats the test assertion
    block to match.

The branch also took HEAD side for session-binding.ts,
thread-lifecycle.ts, compact.ts, side-question.ts,
conversation-control.ts, conversation-binding.ts,
command-handlers.ts, run-attempt.ts, app-server-policy.ts,
approval-bridge.ts, config.ts, harness.ts, cli-runner.ts,
attempt.ts, run-state.ts, acp-runtime-backend.ts,
hook-agent-context.ts, hook-types.ts, and get-reply.ts to
satisfy missing exports and hook-context type references that the
PR 2 commits would have provided. These HEAD-side takes lose some
of the original PR's specific changes to those files; the user can
rebase the PR 2 commits on top to restore the full PR 2 surface.

Verification

  • pnpm tsgo:extensions — 0 errors.
  • pnpm build — clean.
  • node scripts/run-vitest.mjs (9 codex test files) — 16 failures
    remain
    in extensions/codex/index.test.ts (Discord callback
    tests), extensions/codex/src/app-server/config.test.ts (approval
    policy tests), and
    extensions/codex/src/app-server/thread-lifecycle.test.ts (model-ref
    splitting tests). These pass on main and on the current branch
    feat/stack-rebased-20260604; the failures are caused by the
    cherry-pick producing a state that doesn't match either of those
    baselines exactly. Tracked as follow-up fixes.

Plan / upstream notes

Per the upstream plan in
codex-channel-native-session-controls-plan.md and
codex-plan-controls-pr-split-plan.md:

  • Codex source cited per AGENTS.md hard gate:
    codex-rs/protocol/src/protocol.rs:3675-3728 (ReviewDecision),
    codex-rs/protocol/src/approvals.rs:218-265
    (ExecApprovalRequestEvent), codex-rs/app-server-protocol/src/protocol/common.rs:1336,1343,1361
    (v2 RPC method strings).
  • This is the PR 1 / 3 in the split. PR 2 (feat/codex-plan-controls-chat)
    and PR 3 (feat/codex-plan-controls-approvals, net-new code) are
    drafted in sibling worktrees.

Not ready for review

  • 16 vitest test failures in the 3 files noted above need to be
    resolved before merge.
  • The HEAD-side file replacements need to be reconciled with the
    PR 2 commits to keep the full chat-control surface.
  • Codex auto-review run on this branch is recommended before
    marking ready for review.

openclaw#88446

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.