GkeCodeExecutor sandbox mode is incompatible with current k8s-agent-sandbox
#6535
Unanswered
yamadayuki
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
GkeCodeExecutor(executor_type="sandbox")cannot work with any recent version ofk8s-agent-sandbox. The code in_execute_in_sandboxtargets the 0.1.x client API, butpyproject.tomldeclaresk8s-agent-sandbox>=0.1.1.post3with no upper bound — so a freshpip install "google-adk[extensions]"always produces a broken combination.I'd like to understand whether sandbox mode is still intended to be supported before deciding how to build on it.
Versions
google-adk2.6.0 (also reproduced on 2.4.0;mainas of 2026-07-30 has the same code)k8s-agent-sandbox0.5.4 (latest on PyPI)What the code does
src/google/adk/code_executors/gke_code_executor.py:Reproduction (no cluster required)
Three independent incompatibilities, all verified by introspection on 0.5.4:
__init__kwargstemplate_name,namespace,gateway_name, …connection_config,tracer_config,cleanup__enter__/__exit__presentAsyncSandboxClienthasasync with)sandbox.write()/sandbox.run()sandbox.files.write()/sandbox.commands.run()v1alpha1v1beta1The current 0.5.x flow looks like this instead:
Note
create_sandbox(warmpool: str, ...)— aSandboxWarmPoolis now required, which is a meaningful behavioural change from the 0.1.xtemplate_namemodel.Why this seems to have gone unnoticed
ImportError(agentic_sandboxvsk8s_agent_sandbox) whose repro stops atGkeCodeExecutor(...)construction — it never reachesexecute_code, so the deeper mismatch was never hit. fix: update GkeCodeExecutor sandbox import from agentic_sandbox to k8s_agent_sandbox #4884 fixed only the import name, and_execute_in_sandboxhasn't been touched since 2026-03-18.SandboxClientwholesale, so_execute_in_sandboxis never exercised against the real SDK.agent-sandboxrepo's own ADK example (examples/code-interpreter-agent-on-adk) does not useGkeCodeExecutor; it wrapsSandboxClientas a plain function tool.Pinning
k8s-agent-sandbox==0.1.1.post3does make the current code work, but 0.1.x talksv1alpha1, which the CRDs now markdeprecated: true/storage: false. That doesn't look like a path worth building on.Questions
executor_type="sandbox"still intended to be supported, or isexecutor_type="job"the recommended path going forward?k8s-agent-sandboxversion range is it validated against? Would adding an upper bound to theextensionsextra be appropriate in the meantime, so the broken combination isn't the default install?_execute_in_sandboxto the 0.5.x API be welcome? If so, some design input would help:create_sandboxnow requires awarmpoolname — should that become a field onGkeCodeExecutoralongsidesandbox_template?SandboxConnectionConfigshould be the default (in-cluster vs gateway vs local tunnel)?_execute_in_sandboxcurrently ignorestimeout_seconds,cpu_requested/mem_limit, andinvocation_context(so there's no equivalent of job mode's invocation-id annotation). Is that intentional — i.e. all of it delegated to theSandboxTemplate— or in scope for the same fix?All reactions