Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
505958b
feat(worktrees): delegate Codex project lifecycle to host services
showxu Nov 25, 2026
5b7a561
fix(plugin): declare project writes for host worktree operations
showxu Nov 25, 2026
dc0abdd
test(transport): wait for child readiness before ending the owner
showxu Nov 25, 2026
e03d348
fix(plugin): use host-managed runtime storage
showxu Nov 25, 2026
2a2efda
test(integration): accept Codex against pinned Host sources
showxu Nov 25, 2026
ff7821f
ci: pin the reviewed host for consumer acceptance
showxu Nov 25, 2026
a209f04
fix(test): retry removal reads after a Host configuration change
showxu Nov 25, 2026
39484fe
test: derive expected Codex location from the fixture home
showxu Nov 26, 2026
edb1c74
ci: pin Host with reviewed Computer Use declarations
showxu Nov 26, 2026
900cab1
fix(test): fail registered acceptance on skills directory errors
showxu Nov 27, 2026
c75060d
feat: declare Codex service access and document native sign-in
showxu Nov 27, 2026
979a3d9
ci: run consumer checks against the corrected host fixtures
showxu Nov 28, 2026
3f6870f
test: identify the last registered tool call in failed CI reports
showxu Nov 28, 2026
08c1708
ci: verify the consumer against the mounted-project fix
showxu Nov 28, 2026
2b498c4
docs: describe sessions through the local Codex runtime
showxu Nov 28, 2026
8045860
ci: validate against the integrated Host candidate
showxu Nov 28, 2026
daad512
ci: test against the reviewed Host revision
showxu Nov 28, 2026
8104b98
fix: correlate host diagnostics with the admitted invocation
showxu Nov 28, 2026
ee47823
feat: declare scoped Codex tool requirements
showxu Nov 28, 2026
a8c3011
test: verify registered Codex fallback and plugin use
showxu Nov 28, 2026
f7d553f
ci: pin Host for integrated candidate checks
showxu Nov 28, 2026
481d20a
ci: verify against the parallel Host candidate
showxu Nov 29, 2026
b42d2fd
ci: verify the accepted Host candidate
showxu Nov 29, 2026
8826aa2
docs: prepare 0.1.0 release notes
showxu Nov 30, 2026
e264517
ci: pin Computer MCP 0.1.0 for plugin validation
showxu Nov 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/computer-mcp-host.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bee91275a6301e56c64f677125f5d7f38ba7fe0e
23 changes: 20 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
package:
runs-on: macos-latest
timeout-minutes: 30
timeout-minutes: 60
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
Expand Down Expand Up @@ -63,12 +63,29 @@ jobs:
wait "$test_pid"
- name: Validate package ownership and publication
run: |
python3 scripts/check-host.py --help
python3 -m unittest discover -s Tests -p 'test_*.py' -v
python3 scripts/check-workflow.py --check-release-workflow
- name: Build relocatable adapter and receipt
run: python3 scripts/package.py --output dist --configuration release
- name: Accept the release archive against the pinned Host source
run: |
python3 scripts/package.py --output dist --configuration release
python3 scripts/check-package.py --archive dist/codex-plugin-macos-arm64.zip --receipt dist/receipt.json --destination .build/accepted-package
host_revision=$(cat .github/computer-mcp-host.sha)
[[ "$host_revision" =~ ^[0-9a-f]{40}$ && "$host_revision" != 0000000000000000000000000000000000000000 ]]
host_checkout="$PWD/.build/computer-mcp-host"
git init "$host_checkout"
git -C "$host_checkout" fetch --no-tags --depth=1 https://github.com/computer-mcp/computer-mcp.git "$host_revision"
git -C "$host_checkout" checkout --detach FETCH_HEAD
python3 scripts/check-host.py --mode container --host-source "$host_checkout" \
--plugin-revision "$GITHUB_SHA" --archive "$PWD/dist/codex-plugin-macos-arm64.zip" \
--receipt "$PWD/dist/receipt.json" --output-directory "$PWD/.build/host-acceptance"
- name: Record registered Host acceptance
if: always()
run: |
report=.build/host-acceptance/runtime/report.json
if [[ -f "$report" ]]; then
cat "$report"
fi
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: codex-plugin-macos-arm64-${{ github.sha }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

## Unreleased

## 0.1.0 — 2026-11-30

### Added

- Codex can use Host-managed project worktrees for isolated work. The adapter tracks writer leases and exposes diagnostics for managed operations.

- Public-host runtime acceptance for the packaged adapter and installed Codex,
including native permissions, lifecycle recovery, thread handoff, authenticated
model execution and exact owned-process cleanup.
Expand Down
98 changes: 43 additions & 55 deletions Documentation/Architecture/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,55 +218,43 @@ events, native approvals, user input, connection generations, cancellation,
shutdown and handoff. Lease-based reconciliation checks the exact receipted
processes before declaring an uncoordinated owner gone.

`CodexDatabase` stores approvals, runtime leases, thread ownership,
reconciliation receipts, acceptance runs, worktree leases and managed-worktree receipts using their
existing row and JSON representations.
It uses one initial domain schema and GRDB transactions; it does
not store host profiles, credentials, workspace registrations or audit.
Unknown migration identifiers fail before either the domain or shared-lease
store is initialized. Use a fresh adapter state directory for an incompatible
schema. The separate shared-lease database initializes only its lease table and
index.
Host-launched storage is partitioned by verified subject, profile and registered
workspace, not a transient connection or channel. Reconnection retains this
identity. Worktree lease facts use one transactional store per subject and
profile, so a registered child workspace and its source observe the same lease
revision. Tool access remains workspace-bound; cross-workspace lineage requires
a managed-worktree receipt created by the source's verified host registration.
Other domain records remain workspace-partitioned.
Existing unbound storage is preserved and reported for local review;
it is never silently assigned to a new subject. A shared, transactional native
thread-owner index prevents concurrent claims or reads by another subject.
Read-only history lookup does not claim a thread.

`CodexHostTools` requires host preflight plus per-execution authorization and
audit. Native Codex approvals retain official decisions and scopes; host-tool
approvals remain under the host's own authority.
`CodexHostMCPClient` uses the explicitly delegated standard MCP connection.
Its verified subject is fixed, while the host checks current grants for each
call. Tool arguments cannot select authority or an administrator socket.

`CodexManagedWorktreeManager` owns Git planning, creation, ownership checks and
removal, preserving the stored revision and source-workspace scope.
`CodexManagedWorkspaceHost` owns derived-workspace registration and grants,
registration rollback, and destructive-operation authorization. Removal requires
that authorization before changing either Git or the lifecycle receipt.

`CodexOperationalDiagnostics` correlates adapter-owned state with a bounded,
scope-matched `CodexHostDiagnostics` snapshot. Host audit data stays host-owned;
missing host data produces explicit unknown values. Audit projection
retains identifiers and digests, redacts strings, and excludes command bodies.
The executable's launch factory supplies these interfaces when the host provides
its inherited MCP descriptor. Without it, managed-worktree mutations remain
unavailable and host diagnostic fields remain unknown. Vendor subprocesses do
not receive the host descriptor or reserved context. The host chooses the
managed root separately from adapter-domain persistence.

Removal preserves a `removing` receipt when Git succeeded but host cleanup did
not. A new reviewed operation validates path absence and Git state before
retrying metadata only. Provision rollback preserves Git content when host
cleanup is unconfirmed; it never represents that case as a complete rollback.
See [Host integration](../Reference/HostIntegration.md) for the operator contract.
`CodexDatabase` stores approvals, native runtime and thread ownership,
reconciliation receipts, acceptance runs and worktree history. The primary
database is partitioned by verified principal, profile and selected project.
The native thread-owner index coordinates claims independently.

The principal/profile lease database also owns new host-backed worktree
associations and operations. Source and child projections use the same
transactional writer, scoped to their host-returned association. Separate
transactions validate primary run references and persist worktree state.
Worktree migrations run before the provider is published. Legacy worktree
rows retain their original identities and lifecycle states as unmanaged
history in the primary database. Unbound history stays in its original store.
Unknown migrations fail before either required database is migrated.

`CodexHostTools` preflights dynamic callbacks and rechecks authorization at
execution. Native Codex approvals retain official decisions and scopes.
`CodexHostMCPClient` uses the inherited MCP connection with its immutable
verified subject and selected project. Its typed project service methods
preserve complete host responses. Both peers advertise `projects-v1`.

`CodexHostWorktreeManager` records plans and commits the invocation and
operation IDs before private lifecycle calls. On creation, the shared writer
settles the host association and the lease disposition in one transaction.
A competing lease can coexist with a completed creation. Computer MCP
executes Git operations and controls project registration and removal.

Pending operations survive adapter restart. A fresh, authorized managed
worktree read inspects the retained operation ID and can settle its observed
state. The source remains available for this read after the child is removed.
Host recovery owns unresolved effects.

`CodexOperationalDiagnostics` combines adapter records with bounded,
scope-matched host audit observations. It projects identifiers and digests and
redacts diagnostic strings. The launch factory supplies host interfaces only
with the inherited descriptor. Vendor subprocesses receive their own execution
context. See [Host integration](../Reference/HostIntegration.md) for the
operator contract.

## Runtime generations and teardown

Expand Down Expand Up @@ -317,11 +305,11 @@ Standard-MCP dispatch tests use controlled execution doubles and an isolated
protocol process with a durable database. These fixtures
do not prove native model authentication or host-to-adapter integration.

Managed-worktree tests also use private Git repositories and two workspace-bound
MCP connections. They verify lease scope, active/dirty worktree protection,
host denial without mutation, durable removal and branch preservation.
The workspace and diagnostic host implementations in these tests are test
doubles, not evidence of a connected Computer MCP control plane.
Worktree tests use typed host doubles, separate source and child database
connections, and standard MCP dispatch. They exercise reviewed argument
presence, durable operation binding, lease contention, migration and
inspection after a lost reply. Paired acceptance uses the actual adapter
and host with an isolated deterministic vendor peer.

The exposed execution surface includes App Server and Exec.
Version-specific schemas remain separate inspection tools. The package exports an executable, not a
Expand All @@ -345,7 +333,7 @@ acceptance before promoting an artifact to a public release.

## Inherited host channel

The host binds callbacks to its own immutable caller/workspace scope over an
The host binds callbacks to its own immutable caller and project scope over an
inherited connected Unix socket. `COMPUTER_MCP_HOST_FD` selects a canonical
descriptor from 3 through 9 alongside the host context. The transport requires
a connected stream socket, sets close-on-exec and nonblocking mode, and bounds
Expand Down
Loading
Loading