Skip to content

Run the kagent lane inside its monorepo checkout so the deployment's hooks and overlays load #5012

Description

@devantler

🤖 Generated by the Agentic Engineer (interactive Claude Code session)

Part of #4866.

Problem

The kagent lane's Claude Code session starts in the sandbox's /data/workspace before the run clones this repository. Claude Code reads project configuration only from the directory it starts in, so the clone's .claude/ never loads. A host lane starts inside a checkout and gets all of it. The kagent lane gets none of it:

  • The surveyor's read-only guard. .claude/settings.json wires it as a project PreToolUse hook (surveyor-hook-dispatch.sh). Without the hook, the 2026-11-13 run's agentic-engineering:portfolio-surveyor ran every forge read unguarded, and its digest said so.
  • The deployment overlays. .claude/skills/ holds portfolio-maintenance, product-engineering, self-improvement, finops and the product cards, and .claude/agents/ holds daily-maintainer, portfolio-surveyor and platform-security-surveyor. The run used the plugin's canonical skills instead, so the deployment facts those overlays add were missing. That is a partial brain, which Epic: run a budget-capped Agentic Engineer lane on kagent with the monthly Claude API credit #4866's one-brain requirement rules out.

The Harness has no field that clones a repository before the session starts. It offers only env and a workload image, command and args.

Done when

  • A run's Claude Code session starts inside a checkout of this repository at main, so its project settings, hooks, agents and skills load as they do on a host lane.
  • The project's enabledPlugins and extraKnownMarketplaces do not install a second, unpinned copy of the plugin next to the image's pinned one, and the ksail plugin either loads or is shown not to be needed.
  • A run's transcript shows the surveyor's forge reads intercepted by the guard, and an overlay skill (not the plugin's canonical one) driving the run.

Leads

  • The image's claude wrapper already wraps every prompt run. It could clone this repository into a fixed folder and start Claude Code there. Every turn of a session must start in the same folder, or --resume cannot find the session.
  • Check whether Claude Code in non-interactive mode installs a project's enabledPlugins by itself.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions