Repository navigation
relay#586: adopt a terminal Claude in no project, unsandboxed - #592
Merged
barelyworkingcode merged 7 commits intoOct 22, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…dential Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nup, prooftest case Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
merge-check: merged. approved, target, contract, evidence, owner, weakening |
This was referenced Oct 22, 2026
Closed
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 #586
Adopt a terminal Claude session that is in no project. It resumes headless in its original folder with no sandbox, no project policy and no allowed-models check, and every session, terminal and audit row says so. Child of #585; targets
epic/585-projectless-adopt.Non-obvious decisions
authorizeUnsandboxedLaunch(cmd/relay/session_unsandboxed.go) is the only builder for a launch with no project. Only adopt, resume and drop-in call it; resume and drop-in reach it only from a ledger record markedunsandboxed.AuthorizeLaunchis unchanged and still refusesproject_required.claudelaunch or aptydrop-in with no project, sandbox or identity. It refuses an unmarked localclaudelaunch with no project (400invalid_spec). No e2e door reaches the host's internal API; the reviewer checked it.Manager.CreateUnsandboxed), not onterminal.CreateSpec. The wire result is the same.claude_token_fileset, an unsandboxed Claude gets the token on fd 5 through the shim (owner decision), andrelay session modeanswersresume_required. With no token it restarts in place.Approved behaviour changes (not weakening)
G1.50dropsno_projectfrom the Claude reasons and points to the new rowG1.54.G1.45now says only a Claude adopted in no project gets the token unsandboxed.e2e/features/g1_outside_adopt_test.go: theno projectcase ofTestAdoptReasonsOnRowsnow expectsadoptable: true.fakerelay/prooftest/adopt_test.go:TestAdoptRowFieldsServed,TestAdoptFixtureRefusedandTestAdoptRefusalsnow carry the new rule. The oldno projectrefusal cases are replaced, because a world can no longer express them.cmd/devboxverify/journey_adopt.go:runAdoptbecomesadoptFlow(ctx, e, unsandboxed).session-adoptkeeps every check and its timeout.Contract amendments (planner, logged on #586)
internal/sessions/hostapi/server.go(thelaunchTerminalcreate call),docs/events.md(the reason lists),fakerelay/internal/sessions/register.go(launchTarget.unsandboxed).Minor review notes (not fixed)
fakerelay/internal/sessions/terminal.go:218:findTemplate's doc comment sits aboveconsoleTemplate.TestAdoptNoProjectTokenDescriptorasserts exit 1 for the mode refusal, not theresume_requiredcode. The CLI prints only the message text, the same pattern asg1_terminals_test.go.Proof
ok relaye2e/features 862.263s(baseline on 60f4286:ok 848.493s).--stack --phase apion 80ce73b:SUMMARY pass=10 fail=0 blocked=0 notrun=2;session-adoptandsession-adopt-unsandboxedPASS.go test ./...green.Fix attempts: one review round (seven minors, one ownership blocker), plus one journey fix (the Chief of Staff send needed a console). Tokens: about 1.2M across subagents.
Review: no blocking findings (round 2, default model)
Journey: session-adopt-unsandboxed PASS on stack r586, head 80ce73b (log /tmp/c585/r586-dbv-head4.log)
Harness weakening: none; session-adopt keeps all its checks and its 240 s timeout
Main harness vs head: main's devboxverify (60f4286) against head 80ce73b on stack r586: SUMMARY pass=9 fail=0 blocked=0 notrun=2
Break-and-restore: dropping no_project from the session_adopt args turned TestAdoptNoProjectAuditRows red, and on a stack session-adopt-unsandboxed FAIL "a session_adopt row lacks no_project: true (intent)"; both green after the restore
Weakening reviewed: prooftest no_project refusal cases and the e2e no-project expectation replaced by the approved rule change in #585/#586; no assertion loosened
🤖 Generated with Claude Code