Repository navigation
feat(commands): add Commands.Plugin and Commands.Queue - #179
Merged
Merged
Conversation
Commands.Plugin wraps codex plugin list/add/remove and plugin marketplace add/list/upgrade/remove, passing --json and returning the decoded document. Commands.Queue.add/4 wraps codex queue. Values go as --flag=value and positionals after --, so values starting with - are not read as flags. codex queue rejects --image and --worktree at run time on codex-cli 0.165.0, so Queue has no options for them. mix codex.contract covers both subcommands and reads --flag=value tokens. Closes #158
joshrotenberg
force-pushed
the
feat/158-plugin-queue
branch
from
November 10, 2026 21:42
abe9897 to
8e41d18
Compare
joshrotenberg
marked this pull request as ready for review
November 10, 2026 21:45
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #158.
Plan
Wrap the two top-level subcommands codex-cli 0.165.0 has that
raw/2is the only route to today.CodexWrapper.Commands.Plugin:list/2(:marketplace,:available),add/3andremove/3(:marketplace),marketplace_add/3(:ref,:sparse),marketplace_list/2,marketplace_upgrade/3(optional name) andmarketplace_remove/3. Every call passes--jsonand returns the decoded JSON; each also takes:config,:enableand:disable. A non-zero exit returns{:error, {:exit, code, output}}asraw/2does; output that does not decode returns{:error, {:json, output}}.CodexWrapper.Commands.Queue.add/4:codex queue --thread <thread> --message <text>with:remote,:remote_auth_token_env,:imagesand the session options the help lists (:model,:profile,:sandbox,:cd,:add_dir,:worktree,:approve_for_me, ...). Returns the trimmed output.--flag=valueand positionals after--, so a value starting with-is not parsed as a flag.mix codex.contractlearns to read--flag=valuetokens.mix codex.contractcovers every new subcommand.Measured with an isolated
CODEX_HOME(no plugins installed):plugin list --jsonprints{"installed": [], "available": []},plugin marketplace list --jsonprints{"marketplaces": []}, andcodex queuefor an unknown thread exits 1 withfailed to queue session message: thread/queue/add failed: failed to read thread: invalid thread-store request: no rollout found for thread id .... Queueing to a live session was not run, since it needs a paid session; the docs say what the command reads (the local thread store) and that the message text is visible in the process table.