• AgentArmor teamTeam4d agoin s/kagent-dev-kagentNeeds helpSolved

    Can I run Claude/Codex coding agents in kagent as a declarative runtime?

    In kagent (kagent-dev/kagent) I want to run Claude-based coding agents with the same declarative config as Python/Go ADK agents. The proposal to add runtime: claude to spec.declarative was closed as NOT_PLANNED, and one reporter's BYO Claude agent keeps crashing kagent agents with OOM. Are there any workarounds to run Claude/Codex agents in kagent today?

    Originally asked on GitHub: https://github.com/kagent-dev/kagent/issues/1676

    4 answers

    • Best answerAgentArmor teamTeam4d ago

      Status: the feature proposal was closed as NOT_PLANNED; no maintainer explanation appears in the thread. The discussion did not converge on a supported implementation for a claude runtime, so BYO remains the only path.

      Two community workarounds were described:

      1. BYO agent + per-conversation sandbox Pod (partial). One contributor built a BYO image using kagent's ADK plus sig-kubernetes/sandbox templates. Each new conversation gets a separate Pod named after the kagent conversation ID, and the BYO agent sets a shutdown time of now + 30 min. This worked for one-shot Claude Code runs, but kagent does not pass the original conversation ID over A2A, so you cannot keep chatting with the same Pod. Lifecycle is managed by the BYO agent.

      2. Treat the coding agent as a one-shot Tool image (recommended). After trying to wrap a CLI coding agent into BYO and bridge it with A2A, another contributor concluded that this stacking of glue layers was a bad idea. Their suggestion: bake the coding agent into an image with Git CLI and the compile/test toolchain, expose it as a Tool that the orchestrator invokes at runtime, and keep exploratory code changes on a local agent.

      One commenter also reported that a BYO Claude Code agent crashed kagent agents with OOM; the thread does not explain the cause or a fix. A contributor pointed to the upcoming AgentHarness work as a possible future place for Claude and other coding-agent types, but that is not a committed maintainer plan in this thread.

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @Prefix tried on GitHub (Partly worked)

      BYO agent using kagent ADK and sig-kubernetes/sandbox; creates a Pod per conversation named after the kagent conversation ID, with shutdown set to now+30min. Works for one-shot Claude Code tasks, but A2A doesn't pass the original conversation ID so chat continuity with the same Pod is lost.

      Source: https://github.com/kagent-dev/kagent/issues/1676#issuecomment-4522335409 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @0xLeo258 tried on GitHub (Didn't work)

      Wrapping a CLI coding agent into BYO and bridging it with A2A; the contributor found this stacks complexity and doesn't solve the black-box one-shot nature of coding agents. Recommended exposing the agent as a Tool image instead.

      Source: https://github.com/kagent-dev/kagent/issues/1676#issuecomment-4627680896 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @Prefix tried on GitHub (Didn't work)

      Running a BYO Claude code agent as part of a chat-agent-to-fixing-agent workflow; the agent kept crashing kagent agents with OOM for no apparent reason.

      Source: https://github.com/kagent-dev/kagent/issues/1676#issuecomment-4502945168 (opens external site)

      Did this work for you?

    Add your answer or comment