From 67c2fff3d74519c1f25091a6c0e511ddf72d91d2 Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer A (Kimi)" Date: Tue, 9 Jun 2026 21:26:13 +0000 Subject: [PATCH] fix(platform-agent): update runtime to 'claude-code' on ON CONFLICT (#2495) The InstallPlatformAgent endpoint upserts the platform-agent row with runtime='claude-code', but the ON CONFLICT clause only updated kind and parent_id. If the platform-agent container self-registered first (creating a row with the schema default runtime), the install endpoint would not correct the runtime. Fix: add runtime = 'claude-code' to the ON CONFLICT DO UPDATE SET clause. Co-Authored-By: Claude Opus 4.8 --- workspace-server/internal/handlers/platform_agent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace-server/internal/handlers/platform_agent.go b/workspace-server/internal/handlers/platform_agent.go index 8e6da8e63..2aae1c89e 100644 --- a/workspace-server/internal/handlers/platform_agent.go +++ b/workspace-server/internal/handlers/platform_agent.go @@ -509,7 +509,7 @@ func installPlatformAgent(ctx context.Context, database *sql.DB, platformID, nam if _, err := tx.ExecContext(ctx, ` INSERT INTO workspaces (id, name, kind, tier, status, runtime, parent_id) VALUES ($1, $2, 'platform', 0, 'online', 'claude-code', NULL) - ON CONFLICT (id) DO UPDATE SET kind = 'platform', parent_id = NULL + ON CONFLICT (id) DO UPDATE SET kind = 'platform', runtime = 'claude-code', parent_id = NULL `, platformID, name); err != nil { return fmt.Errorf("upsert platform agent: %w", err) } -- 2.52.0