Repository navigation
Conversation
The built-in Claude executor has ID 'claude' but kind 'claude-code' — the only built-in whose ID differs from its kind. runSOPHelper passed the SOP default executor ID into credential/runner helpers that key off the kind, so an account with a valid Claude Code key still got empty credentials and the automatic sandbox selection silently fell back to generic-docker (Tencent#1518). Normalize built-in executor IDs to their Kind at the start of runSOPHelper. Other executors (ID == Kind) and the already-kind working-branch path are unchanged. Part of Tencent#1518; does not close the issue.
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.
fix(assistant): normalize executor ID to kind for SOP sandbox helper
This is the #1518 slice: make "let the agent choose the sandbox" work for accounts configured with Claude Code only.
Problem
The built-in Claude executor has ID
claudebut kindclaude-code— the only built-in whose ID differs from its kind.runSOPHelperpassed the SOP default executor ID into credential/runner helpers that key off the kind (assistant_sop_sandbox.go:53,60-61). An account with a valid Claude Code key therefore got empty credentials at:78, sandbox selection returned empty, and the run silently fell back togeneric-docker(#1518).The working-branch path already passes a kind, so it was unaffected.
Change
internal/httpapi/assistant_sop_sandbox.go— at the start ofrunSOPHelper, normalize a built-in executor ID to its Kind viarepo.BuiltInExecutor(executor).Kind. Other executors (ID == Kind) and the already-kind path are unchanged.No front-end change; no credential-model change.
Verification (Linux/amd64, Docker
python:3.12-slim)go vet,git diff --check, secret scan: clean. Windows cannot compile (Linux-specific syscalls), so Go tests were cross-compiled and run in the container with public embed resources from a sibling worktree.Scope / notes
assistant_sop_sandbox.go).