Repository navigation
feat(threads): add managed sandbox profiles - #1114
Merged
Merged
Conversation
nixuuu
enabled auto-merge (squash)
November 22, 2026 15:41
nixuuu
disabled auto-merge
November 22, 2026 15:42
nixuuu
enabled auto-merge (squash)
November 22, 2026 15:44
nixuuu
disabled auto-merge
November 22, 2026 15:54
nixuuu
enabled auto-merge (squash)
November 22, 2026 15:58
This was referenced Nov 22, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 26, 2026
## Changes - Preserve the directory entry when resolving a Codex login. On macOS, Bun can return the path of another hard link to the same inode during concurrent lookups. Bot migration now detaches the managed link while protecting the source login, including a source reached through a symbolic link. - Lock the thread before marking `StartTurn` and `SteerTurn` as delivered. This matches archival and prevents the sandbox profile trigger from deadlocking against command expiry. - Wait for the gateway's persisted turn context in the linked-agent fixture. Give the Tailscale and Windows Codex fixtures separate process and test budgets with useful failure diagnostics. Run one native packaging test per macOS architecture and log the slow `actool` and Swift phases. - Retry failed Release jobs once for a scheduled nightly when GitHub annotated each failed job with a hosted runner disconnect or an exhausted `CreateArtifact` request timeout. The retry uses the same run and revision and preserves the existing Push CI and publication gates. ## Verification - Bun 1.4.5 on Apple Silicon passed 24 Codex migration and bot login tests and 12 desktop packaging tests through `check:tmp`. A 50,000-iteration race reproduced 23,655 missed links with the previous lookup and zero after the fix. - PostgreSQL 18 reproduced `40P01` with the old outbox lock order. The regression passed five repetitions after the fix. All 31 targeted archive, linked-agent and sandbox integration tests passed. - Tailscale passed 60 repeated executions. Both pinned Codex versions passed the live login fixture on macOS. Codex 0.172.0 also passed with an injected 24-second credential probe startup delay. - Worker and integration typechecks, focused lint and formatting, `actionlint`, and `git diff --check` passed. Tested the recovery script with real historical GitHub job data and a stubbed POST for runner loss, the `CreateArtifact` timeout that blocked [v0.11.0-nightly.1](https://github.com/itsoltech/canopy/actions/runs/45770577786/attempts/1), an ordinary CI failure, and a prior rerun. - GitHub CI covers the native Windows and macOS Intel changes. Live recovery requires a future scheduled Release with one of the recognized GitHub infrastructure failures. Fixes: #1213 Fixes: #1114
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.
Change
Owners can manage sandbox profiles in Settings → Threads and choose them for threads and scheduled tasks. The composer shows
Sandbox - [Profile]. Unavailable choices share a short explanation by cause. The existing permission mode retains its wire value and its original behavior underHarness default. For a linked computer, the picker directs owners to Canopy on that computer for a new selection from its catalog.A named profile applies to sandboxed commands and their descendants. An empty domain list blocks outbound connections. A populated list restricts connections to the exact hostnames. Threads, scheduled tasks, and synced drafts retain the selected policy across resume, retry, and reload. Gateway and worker check the selection before execution. Database guards prevent older gateways from discarding a persisted policy. Consolidation requires the updated schema on both gateways and carries the stored policy and historical command digests.
Thanks @mikuyeyu for reporting the original Codex sandbox behavior.
Runtime support
Verification
Copy audit
Full auto→Sandboxfor the permission mode. The selected profile is visible on the closed control. One-line mode rows retain the permission cues, longer descriptions are underShow permission details, and unavailable profiles share their reason. Checked sentence case, action labels, glossary terms, errors and recovery actions, wrapping and truncation, linked-computer guidance, and accessible names. Status cues use text in addition to styling.