feat: introduce AGENT_CMD env var to make runner scripts LLM-agnostic
Summary
Three runner scripts hard-code the claude binary for headless LLM calls. The intent was never to lock all automation to Claude. This issue introduces a single AGENT_CMD environment variable (defaulting to claude) in each script so any compatible headless CLI can be used instead.
Affected Scripts
| Script | Hard-coded calls |
|---|---|
scripts/autonomous-issue-worker-runner.sh |
2× claude --dangerously-skip-permissions --session-id … -p + verify_claude_auth() |
scripts/proactive-scheduler-runner.sh |
1× claude --dangerously-skip-permissions -p |
scripts/dependency-update-sweep-runner.sh |
2× claude -p --allowedTools … --output-format text |
Approach
Simple env-var substitution. Each script gets:
AGENT_CMD="${AGENT_CMD:-claude}"
All claude binary calls are replaced with "$AGENT_CMD". No flag translation layer — callers must supply a flag-compatible CLI. The --session-id flag (Claude sidebar registration) is guarded behind [[ "$AGENT_CMD" == "claude" ]] since it is Claude-specific.
verify_claude_auth() is renamed verify_agent_auth() and updated to fall through gracefully when the CLI doesn't support auth status.
Full Implementation Plan
See docs/plans/agent-cmd-llm-agnostic-runners.md for the complete detailed plan including exact diffs, comment updates, and SKILL.md prose changes.
Verification
# Smoke test — see what would be called without executing
AGENT_CMD=echo bash scripts/autonomous-issue-worker-runner.sh --help
AGENT_CMD=echo bash scripts/dependency-update-sweep-runner.sh --dry-run
# Full test suite
cd scripts && python3 -m pytest tests/ -x -q
Out of Scope
scripts/setup-superpowers.sh—claude plugin …is Claude plugin managementscripts/orion-authorize.sh—claude auth loginis Claude auth~/.claude/skills/path coupling — separate issuecodex-headless-runnerskill — intentionally Claude-specific
Source: anthropics/skills