-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: add automatic user-approved expert handoff #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MattSyska
wants to merge
7
commits into
openai:main
Choose a base branch
from
MattSyska:syska/pltflw-12470-add-named-expert-broker-for-luna-max-handoff
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+632
−35
Open
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
70449e7
feat: support max reasoning effort
MattSyska b390609
feat: add automatic expert handoff
MattSyska 7411443
fix: preserve expert flags with selected routing
MattSyska c1d3548
fix: preserve expert routing after passthrough
MattSyska 32c0e20
fix: route fresh rescue tasks to Luna
MattSyska 361bee8
fix: require expert routing selection
MattSyska cb9538d
fix: preserve expert handoff parsing
MattSyska File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| description: Automatically ask a user-selected named Codex expert when the current model needs a stronger bounded pass | ||
| argument-hint: "[--name <name>] [--write] [handoff]" | ||
| allowed-tools: Bash(node:*), AskUserQuestion | ||
| --- | ||
|
|
||
| Use the companion expert broker for a deliberate, user-approved escalation when the current model has reached its supported effort ceiling, has failed a bounded task, or identifies an ambiguous/high-risk decision that needs a stronger pass. This command is safe for model invocation because it always pauses for the user's model-and-effort choice before starting an expert, even when raw arguments contain routing flags. | ||
|
|
||
| Raw handoff request: | ||
| `$ARGUMENTS` | ||
|
|
||
| Use `AskUserQuestion` exactly once with these two questions: | ||
|
|
||
| 1. Which expert model should handle the handoff? | ||
| - `Sol (Recommended)` — map to `gpt-5.6-sol` and use it as the default expert. | ||
| - `Terra` — map to `gpt-5.6-terra` for a balanced expert pass. | ||
| - `Luna` — map to `gpt-5.6-luna` for a lower-cost expert pass. | ||
| 2. How much reasoning effort should the expert use? | ||
| - `High (Recommended)` — the default Sol setting. | ||
| - `XHigh` — spend more effort on a difficult bounded problem. | ||
| - `Max` — use the maximum effort supported by this harness. | ||
|
|
||
| After the choice, invoke exactly one foreground command, adding the selected `--model` and `--effort` values after the raw handoff arguments so the user's choice is authoritative: | ||
|
|
||
| ```bash | ||
| node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" expert "$ARGUMENTS" --model <selected-model-id> --effort <selected-effort> | ||
| ``` | ||
|
|
||
| Return the command's stdout verbatim. The selected model and effort are authoritative even if raw arguments contained routing flags. Do not silently change the selected model or effort, create a second expert, or modify the handoff text. The command creates a persistent named Codex thread and returns its session ID with the expert's final answer. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.