Repository navigation
feat(codex): bind a checkout to an existing Scope - #1760
Merged
Teingi merged 4 commits intoSep 28, 2026
Merged
Conversation
Codex could only pin one process-wide Scope or the current session. Persist a workspace binding so a later session in that Git root resolves the chosen Scope.
ty rejects subscripting the request payload object. Compare the recorded binding with the typed workspace key instead.
knqiufan
marked this pull request as ready for review
September 28, 2026 06:52
knqiufan
requested review from
Alanxtl,
PsiACE,
Teingi and
zhanghuidinah
as code owners
September 28, 2026 06:52
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.
Which issue or RFC does this PR close?
Closes #1759. Follows RFC 1345's server-owned Scope identity and explicit workspace binding contract.
Rationale for this change
Codex can select one process-wide Scope or freeze the current Session, but it lacks the checkout binding command already available in Claude Code and WorkBuddy. Without it, new sessions in separate projects fall back to Default; MCP set_scope_binding only changes the current Session.
What changes are included in this PR?
Are there any user-facing changes?
Users can persist a checkout to an existing Scope for later sessions. POWERCONTEXT_CODEX_SCOPE_ID retains precedence, and existing Session bindings remain intact. MCP binding tools still target the current Session. No API or persisted-format changes.
How was this change tested?
uv run pytest -q tests/codex_plugin tests/e2e/test_codex_service_chain.py— 242 passed, 6 skipped.uv run prek run -awithPREK_SKIP=ty-check— passed; type checking ran separately below.uv run ty check --python-platform linux --exclude docs/my— passed. Default local type checking includes unrelated untracked research scripts and Linux-only APIs on Windows.uv lock --checkandgit diff --check— passed.The service-chain test uses the real HTTP server and SQLite with direct CLI/hook invocation; it does not establish acceptance inside the real Codex UI or against OceanBase.
AI usage statement
Grok 4.7 assisted with implementation, tests, and documentation. OpenAI Codex assisted with review, Skill guidance, service-chain coverage, and validation.