feat(adapter-codex-local): prove Codex device login inside a Daytona sandbox - #11097
Open
nickyleach wants to merge 5 commits into
Open
feat(adapter-codex-local): prove Codex device login inside a Daytona sandbox#11097nickyleach wants to merge 5 commits into
nickyleach wants to merge 5 commits into
Conversation
Parse the Codex device-login output for the login URL and the one-time code. Accept only the exact origin and path https://auth.openai.com/codex/device and reject any query or fragment. Accept only the XXXX-XXXXX code structure. Keep the URL and the code out of every log and every thrown error. Add redacted, real sample fixtures from the capture step and table-driven tests. Co-authored-by: Paperclip <noreply@paperclip.ing>
Run the Codex device-login command through an injected SandboxLoginDriver. Surface the parsed prompt one time in memory and read the credential one time on success. Handle a timeout and a cancellation, and always dispose the driver. Parse the stream in an in-memory buffer only; never forward, retain, or log the raw text, and keep the URL, the code, and any token out of every log line, the result, and every thrown error. Co-authored-by: Paperclip <noreply@paperclip.ing>
Install the sandbox credential into a unique, run-scoped, private proof home under a company-scoped root. Reject the default, shared, and managed homes, reject a symlink or a non-regular path, and reject an API-key, malformed, or oversized payload before any write. Create the root and the home at mode 0700 and stage auth.json at mode 0600 under a directory lock. Seed an empty home and delegate a strictly-newer, same-identity update to the reused copy-back helper. Add removeProofHome for the cleanup step. Never log token bytes. Co-authored-by: Paperclip <noreply@paperclip.ing>
|
✅ All checks passing — ready for Greptile review and maintainer approval. — commitperclip |
Contributor
Author
|
The PR body now contains the required issue description and deduplication checklist. CI still needs a code-owner update: remove pnpm-lock.yaml from this PR, re-push feat/codex-sandbox-device-login-proof, and rerun the checks. The verify and e2e failures result from skipped dependent jobs. |
Wire the Daytona SDK to the injected SandboxLoginDriver and prove the device login end to end. Require a Daytona environment id argument and fail loud when it is absent, when no controlling terminal exists, or when the environment provider is not daytona. Stream the login output in memory through a non-persisting exec path, write the URL and the code only to the controlling terminal, install the credential into a run-scoped proof home, and run a second sandbox that uses the saved credential. Delete the proof home and every sandbox in a finally block on every terminal path. Resolve the environment record through the workspace database client (a devDependency). Load the Daytona SDK through a dynamic import against a local interface, so the adapter never declares the heavy SDK dependency; a live run installs @daytonaio/sdk or sets PAPERCLIP_DAYTONA_SDK_MODULE. Co-authored-by: Paperclip <noreply@paperclip.ing>
nickyleach
force-pushed
the
feat/codex-sandbox-device-login-proof
branch
from
August 8, 2026 17:06
7f3fa42 to
2fe4e6d
Compare
Contributor
Author
|
@greptile review |
Remove the development-only device-login proof script and its only two devDependencies (@paperclipai/db and drizzle-orm). No production file imports these packages, so the adapter no longer declares a data-store dependency. This change is subtractive; it reduces the adapter surface. Keep the production primitives: the parser, the runner, the export, their tests, and the fixtures. Co-authored-by: Paperclip <noreply@paperclip.ing>
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.
Thinking Path
Linked Issues or Issue Description
Agent or provider
Codex local adapter with Daytona sandbox support.
Why this adapter is useful
Paperclip can prove Codex device login in a remote sandbox. The flow supports secure credential setup without exposing login data to logs or persistent shared paths.
How the agent is invoked
The proof CLI uses the Daytona SDK. It runs Codex device login in one sandbox, exports the credential to a private run-scoped home, and verifies the credential in a second sandbox.
Additional context
The parser accepts only the OpenAI device-login origin and path. The runner handles timeout and cancellation. The export step uses strict path, payload, and file-mode checks. The CLI writes the login URL and code only to the controlling terminal.
What Changed
Verification
Risks
Model Used
Codex, GPT-5, tool use, code execution, and repository review. The exact model context window and reasoning mode are controlled by the Paperclip runtime.
Checklist