Skip to content

k8s: support custom coding CLI sidecar image via coding_cli_sidecars config#92

Draft
pkillianjackson wants to merge 1 commit into
mainfrom
oz-agent/custom-cc-sidecar
Draft

k8s: support custom coding CLI sidecar image via coding_cli_sidecars config#92
pkillianjackson wants to merge 1 commit into
mainfrom
oz-agent/custom-cc-sidecar

Conversation

@pkillianjackson

Copy link
Copy Markdown

Summary

Adds a new coding_cli_sidecars config option to the Kubernetes backend that lets self-hosted workers specify a custom Docker image for a harness's coding CLI sidecar (e.g. Claude Code or Codex). This is a customer requirement for teams like IMC who want to use their own Claude Code binary wrapper instead of the Warp-provided sidecar image.

Motivation

The existing sidecar_image config only overrides the Warp agent sidecar (at /agent). For coding CLI harnesses (Claude Code, Codex), the binary is delivered via an additional sidecar mounted at /mnt/{harness}-cli-sidecar. Previously there was no way for a self-hosted k8s operator to bring their own harness binary — it was fully server-controlled via selfhosted.coding_cli_sidecars.{harness} in warp-server config.

Changes

  • internal/config/config.go: Adds CodingCLISidecars map[string]string (yaml: coding_cli_sidecars) to KubernetesConfig
  • internal/worker/kubernetes.go: Adds CodingCLISidecars to KubernetesBackendConfig
  • main.go: Wires the new config field through mergeConfigKubernetesBackendConfig
  • internal/worker/worker.go: In prepareTaskParams, after building the sidecars list, overrides or injects the coding CLI sidecar when the task's harness matches a coding_cli_sidecars entry
  • README.md: Documents the new config option with an example

Behavior

When a task arrives using a non-oz harness (e.g. claude), the worker:

  1. Overrides the server-provided image at /mnt/{harness}-cli-sidecar if one was sent, OR
  2. Injects a new sidecar entry if the server did not include one

Example worker config:

backend:
  kubernetes:
    coding_cli_sidecars:
      claude: "registry.internal.example.com/my-claude-wrapper:v1"

The custom image must have the harness binary (claude) reachable in PATH at runtime — the Warp agent entrypoint adds the sidecar's directories to PATH automatically.

Conversation: https://staging.warp.dev/conversation/b3fa41e8-1525-4896-b6be-ac6f9e0a9b5b
Run: https://oz.staging.warp.dev/runs/019f0530-f7a6-7586-b838-91788050ef50

This PR was generated with Oz.

…config

Adds a new coding_cli_sidecars map field to the Kubernetes backend config
that lets self-hosted k8s workers specify a custom Docker image for a given
harness's coding CLI sidecar (e.g. Claude Code or Codex).

When a task arrives with a non-oz harness (e.g. claude), the worker now:
  - Replaces the server-provided sidecar image at /mnt/{harness}-cli-sidecar
    with the operator-configured custom image, OR
  - Injects a new sidecar entry if the server did not send one (e.g. because
    no Warp-side image is configured for this deployment).

This allows customers like IMC to bring their own claude wrapper binary
instead of depending on a Warp-controlled sidecar image. Example config:

  backend:
    kubernetes:
      coding_cli_sidecars:
        claude: "registry.internal.example.com/my-claude-wrapper:v1"

The custom image must have the harness binary reachable on PATH (the Warp
agent entrypoint adds /mnt/{harness}-cli-sidecar paths to PATH at runtime).

Co-Authored-By: Oz <oz-agent@warp.dev>
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.

1 participant