Skip to content

feat: support optional Lite Harness CLI provider#80

Open
ishaan-berri wants to merge 1 commit into
opactorai:mainfrom
ishaan-berri:codex/lite-harness-cli-provider
Open

feat: support optional Lite Harness CLI provider#80
ishaan-berri wants to merge 1 commit into
opactorai:mainfrom
ishaan-berri:codex/lite-harness-cli-provider

Conversation

@ishaan-berri

@ishaan-berri ishaan-berri commented Jun 3, 2026

Copy link
Copy Markdown

Summary

Adds a small local Agent SDK adapter for Claudable's CLI services. The default path still uses @anthropic-ai/claude-agent-sdk, so current Claude and GLM flows keep the same behavior.

When CLAUDABLE_AGENT_SDK_PROVIDER=lite-harness is set, the adapter loads Lite Harness and keeps the existing query() call sites while allowing the runtime harness to be selected either in code or with env vars.

Swap harnesses in code

The CLI services can keep importing the local adapter:

import { query } from './agent-sdk';

Then callers can choose the harness at the call site:

await query({
  prompt,
  options: {
    harness: 'claude-code',
  },
});

await query({
  prompt,
  options: {
    harness: 'codex',
  },
});

await query({
  prompt,
  options: {
    harness: 'pi-ai',
  },
});

The default remains Claude Agent SDK unless CLAUDABLE_AGENT_SDK_PROVIDER=lite-harness is enabled. LITE_HARNESS_HARNESS can also set the default harness for existing call sites without touching each query call.

Why

I am a LiteLLM maintainer, and we are working on Lite Harness to solve the agent harness problem: letting developers keep one common SDK shape while swapping the runtime harness they want to use.

Claudable already supports multiple local CLI agents, and these two services already route through the Claude Agent SDK query() shape. This PR keeps that code path stable while making Claude Code, Codex, PI AI, or another Lite Harness runtime a small adapter/config choice. We would love feedback on whether this is useful for Claudable's agent runtime workflow.

How to try it

Default behavior remains unchanged.

Try Lite Harness after installing/packing the preview SDK in your environment:

CLAUDABLE_AGENT_SDK_PROVIDER=lite-harness \
LITE_HARNESS_HARNESS=codex \
LITE_HARNESS_MODEL=gpt-5.5 \
npm run dev

Swap LITE_HARNESS_HARNESS to claude-code, codex, or pi-ai to choose the harness without changing the app command.

Verification

  • PATH="/Users/ishaanjaffer/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH" npm ci
  • PATH="/Users/ishaanjaffer/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH" npm run type-check
  • git diff --check

Note: npm ci reports existing dependency audit findings and runs the repo postinstall setup, which creates local .env files. No env files are included in this PR.

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