Skip to content

feat: add automatic user-approved expert handoff - #576

Open
MattSyska wants to merge 7 commits into
openai:mainfrom
MattSyska:syska/pltflw-12470-add-named-expert-broker-for-luna-max-handoff
Open

feat: add automatic user-approved expert handoff#576
MattSyska wants to merge 7 commits into
openai:mainfrom
MattSyska:syska/pltflw-12470-add-named-expert-broker-for-luna-max-handoff

Conversation

@MattSyska

@MattSyska MattSyska commented Jul 31, 2026

Copy link
Copy Markdown

What we are solving

The plugin’s bounded rescue path can otherwise inherit an unintended model or effort, making the Luna-first execution policy non-deterministic. Luna Max also needs a user-controlled way to ask for a named expert when it reaches its limit.

Why

Fresh bounded work should use the lower-cost execution tier by default, while explicit escalation remains under the user’s control. A user can choose the expert model and effort, with Sol + High offered by default, without silently changing the active task’s cost or routing.

Changes

  • Default fresh rescue tasks to gpt-5.6-luna at max effort when no routing flags are supplied.
  • Preserve explicit model and effort selections.
  • Preserve the existing thread’s routing when resuming a task.
  • Keep the model-invocable /codex:expert command and its user-selected model/effort chooser, defaulting to Sol + High.
  • Start a persistent, named Codex thread through the direct app-server bridge and return the session ID, final answer, and structured result.
  • Keep read-only execution as the default, with an explicit --write option.
  • Cover defaults, overrides, resume behavior, expert selection, persistence, and raw-flag preservation in command/runtime tests.

Boundary

This wrapper controls Claude-to-Codex companion task invocation. Native Codex-app internal child-agent scheduling remains outside this plugin’s control.

Verification

  • npm test — 97 tests passed
  • npm run build — passed; TypeScript compilation completed
  • git diff --check — passed

Related

@MattSyska
MattSyska requested a review from a team July 31, 2026 18:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3906094e1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread plugins/codex/commands/expert.md
@MattSyska MattSyska changed the title feat: add automatic user-approved expert handoff (PLTFLW-12470) feat: add automatic user-approved expert handoff Jul 31, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7411443e0a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread plugins/codex/scripts/codex-companion.mjs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1d3548e51

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread plugins/codex/scripts/codex-companion.mjs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32c0e20321

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread plugins/codex/scripts/codex-companion.mjs
Comment thread plugins/codex/scripts/codex-companion.mjs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 361bee8d20

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread plugins/codex/scripts/codex-companion.mjs Outdated
@MattSyska

Copy link
Copy Markdown
Author

Addressed the latest expert-handoff review findings in cb9538d. Raw slash-command parsing now limits controls to --json/--write/--name, ignores raw routing values for selection purposes, preserves hidden flags and passthrough separators, and supports normal CLI value flags before the handoff. Added regression coverage; npm test passes all 100 tests, npm run build passes, and git diff --check is clean.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb9538d1c4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread plugins/codex/scripts/codex-companion.mjs
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.

1 participant