Skip to content

fix(agent): unify worker runtime selection compatibility#272

Merged
RussellLuo merged 3 commits into
OpenCSGs:mainfrom
wanghaojie124:dev
Jul 2, 2026
Merged

fix(agent): unify worker runtime selection compatibility#272
RussellLuo merged 3 commits into
OpenCSGs:mainfrom
wanghaojie124:dev

Conversation

@wanghaojie124

Copy link
Copy Markdown
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.

Comment thread internal/api/handler.go Outdated
if h == nil || h.svc == nil {
return spec
}
if _, err := h.svc.Runtime(agent.RuntimeKindCodex); err == nil {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@RussellLuo RussellLuo merged commit 9d89cf9 into OpenCSGs:main Jul 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants