fix(agent): unify worker runtime selection compatibility#272
Merged
Conversation
wanghaojie124
commented
Jul 2, 2026
Collaborator
- Unify worker runtime selection by introducing runtime_name + sandbox_enabled and adding backend compatibility for legacy runtime_kind payloads.
- Update agent create/update API, CLI, and field mask handling so split runtime fields stay consistent and older clients do not break.
- Fix worker default runtime and image selection, including sandbox fallback when Codex CLI is unavailable and default image resolution for sandbox workers.
- Refresh the Workspace AgentProfileModal runtime UX with Codex CLI / sandbox selection, helper copy, and frontend runtime normalization updates.
- Add backend and frontend regression coverage for runtime normalization, legacy compatibility, default image fallback, modal switching behavior, and UI contract expectations.
RussellLuo
reviewed
Jul 2, 2026
| if h == nil || h.svc == nil { | ||
| return spec | ||
| } | ||
| if _, err := h.svc.Runtime(agent.RuntimeKindCodex); err == nil { |
Collaborator
There was a problem hiding this comment.
defaultWorkerCreateSpec() still treats Codex as available when h.svc.Runtime(agent.RuntimeKindCodex) succeeds, but actual worker creation now gates local runtime on codexcli.Locator().Locate() in CreateWorker(). Those checks are not equivalent. On a machine where the Codex runtime is registered but the Codex CLI is not installed, bootstrap already marks Codex unavailable, yet the auto-created worker here will still default to Codex and later fail with codex cli not installed. Consider reusing the same availability check as workerRuntimeChoices() so this fallback stays consistent.
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.