Skip to content

feat(claude-code): add ax-harness launcher with runtime install fallback - #3

Open
Lukeluds wants to merge 2 commits into
agentexecutor:mainfrom
Lukeluds:feat/claude-code-harness
Open

Lukeluds wants to merge 2 commits into
agentexecutor:mainfrom
Lukeluds:feat/claude-code-harness

Conversation

@Lukeluds

Copy link
Copy Markdown
Collaborator

Adds agents/claude-code/ax-harness, unit tests (test_harness.sh), and a CI workflow (.github/workflows/claude-code.yaml) for running headless Claude Code tasks under the AX in-container wrapper contract:

  • Reads $AX_GOAL_FILE (exits 2 when empty) and optional $AX_CONFIG_FILE (spec.config JSON), mapping camelCase keys to sorted claude --print --kebab-case CLI flags.
  • Supports runtime installation on startup: if claude is not already present on PATH, runs Anthropic's official installer (https://claude.ai/install.sh at ${CLAUDE_CODE_VERSION:-stable}) and exposes $HOME/.local/bin before launching.
  • Adds agents/claude-code/test_harness.sh testing flag generation, the runtime-install fallback (against a local mock installer), and empty-goal handling.

@mayawang

Copy link
Copy Markdown
Collaborator

Heads up: AX's runner (google/ax#621) writes AX_GOAL_FILE from spec.goal.text, not spec.config.prompt, and expects the answer in $AX_OUTPUT_FILE. Could the harness read the goal file as-is and write its answer there? Same applies to the Antigravity harness once that design settles.

Match the files the AX runner writes for the image's launcher:

- Read the prompt from AX_GOAL_FILE (spec.goal.text) as-is and reject
  spec.config.prompt instead of skipping it.
- Write the answer to AX_OUTPUT_FILE when set, still printing it to
  stdout and keeping claude's exit code.
- Pass AX_MCP_CONFIG_FILE as --mcp-config when it lists a server.
- Fail on an invalid spec.config instead of silently dropping flags
  (the translation ran in a process substitution, whose exit code was
  ignored).
@Lukeluds

Copy link
Copy Markdown
Collaborator Author

Done: updated ax-harness (and #4/#5) to match google/ax#621: reads AX_GOAL_FILE as-is, writes $AX_OUTPUT_FILE, and wires --mcp-config from $AX_MCP_CONFIG_FILE (AX_SESSION_FILE left for a follow-up).

@MushuEE

MushuEE commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Tracking: the release epic #12 covers publishing images from this repo. The Claude Code image is left out of publishing there for now, so this PR isn't tied to the v0.0.0 release work.

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.

3 participants