Bring the upstream claude_args passthrough input and structured_output output into this Gitea fork, so downstream workflows can run the agent with arbitrary Claude CLI flags — specifically --output-format json --json-schema '<schema>' — and read the schema-validated verdict back as an action output (no agent-written file), while keeping the Gitea API + Gitea MCP adaptations this fork exists for.
Downstream driver: ryan/ourwhmcs PR-review workflow wants the review verdict to be the model's own schema-enforced output instead of a file the agent writes (ourwhmcs #1164/#1165).
Current state (why it doesn't work today)
This fork is a port of the pre-v1claude-code-action architecture. Its Run Claude Code step delegates the actual claude invocation to anthropics/claude-code-base-action@v0.0.63.
In v0.0.63, src/run-claude.ts builds a fixed arg list: BASE_ARGS = ["-p","--verbose","--output-format","stream-json"] plus only --allowedTools/--disallowedTools/--max-turns/--mcp-config/--system-prompt/--append-system-prompt/--fallback-model/--model.
There is no input for arbitrary args and nostructured_output.
v0.0.63 is also the newest released tag of claude-code-base-action.
Upstream state (where the capability lives)
anthropics/claude-code-action v1.x (released; v1.0 on 2025-08-26, latest v1.0.133) replaced the many individual inputs with a single claude_args input ("Additional arguments to pass directly to Claude CLI") and added a structured_output output ("JSON string containing all structured output fields when --json-schema is provided in claude_args").
anthropics/claude-code-base-action also has claude_args + structured_output — but only on untagged main (no release tag carries it yet).
Options to merge
Option A — Re-base the fork onto claude-code-action v1 (e.g. v1.0.133)
Adopt the v1 architecture (single prompt + claude_args + structured_output, no separate pre-v1 base-action delegation) and re-apply the Gitea adaptations on top:
octokit / api.github.com → Gitea API ($GITHUB_API_URL = Gitea instance)
GitHub MCP → Gitea MCP server config
GitHub event payload shapes → Gitea equivalents
Cleanest long-term (tracks upstream, real release tags, structured_output native). Largest effort — v1 is a substantial rewrite vs the pre-v1 base this fork derives from.
Option B — Minimal passthrough patch (keep current architecture)
Bump the inner pin anthropics/claude-code-base-action@v0.0.63 → a main commit SHA that has claude_args + structured_output.
Add a claude_args input to this fork's action.yml, forward it to base-action with: claude_args:.
Add a structured_output output to this fork, mapped from the base-action step's structured_output.
Smaller change. Risks: pins an untagged base-action main commit (moving target unless SHA-pinned); base-action main may have diverged from the v0.0.63 behavior this fork relies on (prompt-file delivery, mcp_config, stream-json execution log) — must retest those.
Cross-cutting caveats (apply to either option)
Runner image rebuild required. The downstream claude-runner image bakes the action SHA, the base-action tag, and a claude CLI version (currently 1.0.117). --json-schema needs a CLI new enough to support it (1.0.117 predates it). So merging this requires rebuilding/pushing the runner image with a newer claude and the matching ACTION_SHA/BASE_ACTION_TAG, then restarting the runner (see ourwhmcs .gitea/runner/README.md).
Blast radius. Bumping the base action affects every downstream step using this fork (PR review, docs-update, conflict-resolver, issue-triage, @claude). Verify each still works: prompt-file delivery, Gitea MCP tools, and the execution_file / stream-json parsing.
Acceptance criteria
This fork exposes a claude_argsinput and a structured_outputoutput.
A downstream workflow can set claude_args: --output-format json --json-schema "$(cat schema.json)" and read the schema-validated object from steps.<id>.outputs.structured_output.
## Goal
Bring the upstream **`claude_args`** passthrough input and **`structured_output`** output into this Gitea fork, so downstream workflows can run the agent with arbitrary Claude CLI flags — specifically `--output-format json --json-schema '<schema>'` — and read the schema-validated verdict back as an action output (no agent-written file), while keeping the Gitea API + Gitea MCP adaptations this fork exists for.
Downstream driver: `ryan/ourwhmcs` PR-review workflow wants the review verdict to be the model's own schema-enforced output instead of a file the agent writes (ourwhmcs #1164/#1165).
## Current state (why it doesn't work today)
- This fork is a port of the **pre-v1** `claude-code-action` architecture. Its `Run Claude Code` step delegates the actual `claude` invocation to **`anthropics/claude-code-base-action@v0.0.63`**.
- In `v0.0.63`, `src/run-claude.ts` builds a **fixed** arg list:
`BASE_ARGS = ["-p","--verbose","--output-format","stream-json"]` plus only `--allowedTools/--disallowedTools/--max-turns/--mcp-config/--system-prompt/--append-system-prompt/--fallback-model/--model`.
There is **no** input for arbitrary args and **no** `structured_output`.
- `v0.0.63` is also the **newest released tag** of `claude-code-base-action`.
## Upstream state (where the capability lives)
- **`anthropics/claude-code-action` v1.x** (released; v1.0 on 2025-08-26, latest `v1.0.133`) replaced the many individual inputs with a single **`claude_args`** input ("Additional arguments to pass directly to Claude CLI") and added a **`structured_output`** output ("JSON string containing all structured output fields when `--json-schema` is provided in `claude_args`").
- **`anthropics/claude-code-base-action`** also has `claude_args` + `structured_output` — but **only on untagged `main`** (no release tag carries it yet).
## Options to merge
### Option A — Re-base the fork onto `claude-code-action` v1 (e.g. `v1.0.133`)
Adopt the v1 architecture (single `prompt` + `claude_args` + `structured_output`, no separate pre-v1 base-action delegation) and re-apply the Gitea adaptations on top:
- octokit / `api.github.com` → Gitea API (`$GITHUB_API_URL` = Gitea instance)
- GitHub MCP → Gitea MCP server config
- GitHub event payload shapes → Gitea equivalents
Cleanest long-term (tracks upstream, real release tags, `structured_output` native). Largest effort — v1 is a substantial rewrite vs the pre-v1 base this fork derives from.
### Option B — Minimal passthrough patch (keep current architecture)
- Bump the inner pin `anthropics/claude-code-base-action@v0.0.63` → a **`main` commit SHA** that has `claude_args` + `structured_output`.
- Add a **`claude_args`** input to this fork's `action.yml`, forward it to base-action `with: claude_args:`.
- Add a **`structured_output`** output to this fork, mapped from the base-action step's `structured_output`.
Smaller change. Risks: pins an **untagged** base-action `main` commit (moving target unless SHA-pinned); base-action `main` may have diverged from the `v0.0.63` behavior this fork relies on (prompt-file delivery, `mcp_config`, stream-json execution log) — must retest those.
## Cross-cutting caveats (apply to either option)
1. **Runner image rebuild required.** The downstream `claude-runner` image bakes the action SHA, the base-action tag, and a **`claude` CLI version (currently 1.0.117)**. `--json-schema` needs a CLI new enough to support it (1.0.117 predates it). So merging this requires rebuilding/pushing the runner image with a newer `claude` and the matching `ACTION_SHA`/`BASE_ACTION_TAG`, then restarting the runner (see ourwhmcs `.gitea/runner/README.md`).
2. **Blast radius.** Bumping the base action affects **every** downstream step using this fork (PR review, docs-update, conflict-resolver, issue-triage, `@claude`). Verify each still works: prompt-file delivery, Gitea MCP tools, and the `execution_file` / stream-json parsing.
## Acceptance criteria
- This fork exposes a `claude_args` **input** and a `structured_output` **output**.
- A downstream workflow can set `claude_args: --output-format json --json-schema "$(cat schema.json)"` and read the schema-validated object from `steps.<id>.outputs.structured_output`.
- Existing fork-based steps (review/docs/conflict/triage/@claude) behave unchanged.
- Pin targets documented (action SHA + base-action ref) and runner image rebuilt to a `claude` CLI that supports `--json-schema`.
## References
- Upstream input/output: `anthropics/claude-code-action@v1.0.133` `action.yml` (`claude_args`, `structured_output`).
- Base action feature on `main`: `anthropics/claude-code-base-action` `action.yml` + `src/run-claude.ts`.
- Downstream consumer: `ryan/ourwhmcs` #1164 / #1165 (PR-review prompt extraction; verdict-as-LLM-output goal).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
Bring the upstream
claude_argspassthrough input andstructured_outputoutput into this Gitea fork, so downstream workflows can run the agent with arbitrary Claude CLI flags — specifically--output-format json --json-schema '<schema>'— and read the schema-validated verdict back as an action output (no agent-written file), while keeping the Gitea API + Gitea MCP adaptations this fork exists for.Downstream driver:
ryan/ourwhmcsPR-review workflow wants the review verdict to be the model's own schema-enforced output instead of a file the agent writes (ourwhmcs #1164/#1165).Current state (why it doesn't work today)
claude-code-actionarchitecture. ItsRun Claude Codestep delegates the actualclaudeinvocation toanthropics/claude-code-base-action@v0.0.63.v0.0.63,src/run-claude.tsbuilds a fixed arg list:BASE_ARGS = ["-p","--verbose","--output-format","stream-json"]plus only--allowedTools/--disallowedTools/--max-turns/--mcp-config/--system-prompt/--append-system-prompt/--fallback-model/--model.There is no input for arbitrary args and no
structured_output.v0.0.63is also the newest released tag ofclaude-code-base-action.Upstream state (where the capability lives)
anthropics/claude-code-actionv1.x (released; v1.0 on 2025-08-26, latestv1.0.133) replaced the many individual inputs with a singleclaude_argsinput ("Additional arguments to pass directly to Claude CLI") and added astructured_outputoutput ("JSON string containing all structured output fields when--json-schemais provided inclaude_args").anthropics/claude-code-base-actionalso hasclaude_args+structured_output— but only on untaggedmain(no release tag carries it yet).Options to merge
Option A — Re-base the fork onto
claude-code-actionv1 (e.g.v1.0.133)Adopt the v1 architecture (single
prompt+claude_args+structured_output, no separate pre-v1 base-action delegation) and re-apply the Gitea adaptations on top:api.github.com→ Gitea API ($GITHUB_API_URL= Gitea instance)Cleanest long-term (tracks upstream, real release tags,
structured_outputnative). Largest effort — v1 is a substantial rewrite vs the pre-v1 base this fork derives from.Option B — Minimal passthrough patch (keep current architecture)
anthropics/claude-code-base-action@v0.0.63→ amaincommit SHA that hasclaude_args+structured_output.claude_argsinput to this fork'saction.yml, forward it to base-actionwith: claude_args:.structured_outputoutput to this fork, mapped from the base-action step'sstructured_output.Smaller change. Risks: pins an untagged base-action
maincommit (moving target unless SHA-pinned); base-actionmainmay have diverged from thev0.0.63behavior this fork relies on (prompt-file delivery,mcp_config, stream-json execution log) — must retest those.Cross-cutting caveats (apply to either option)
claude-runnerimage bakes the action SHA, the base-action tag, and aclaudeCLI version (currently 1.0.117).--json-schemaneeds a CLI new enough to support it (1.0.117 predates it). So merging this requires rebuilding/pushing the runner image with a newerclaudeand the matchingACTION_SHA/BASE_ACTION_TAG, then restarting the runner (see ourwhmcs.gitea/runner/README.md).@claude). Verify each still works: prompt-file delivery, Gitea MCP tools, and theexecution_file/ stream-json parsing.Acceptance criteria
claude_argsinput and astructured_outputoutput.claude_args: --output-format json --json-schema "$(cat schema.json)"and read the schema-validated object fromsteps.<id>.outputs.structured_output.claudeCLI that supports--json-schema.References
anthropics/claude-code-action@v1.0.133action.yml(claude_args,structured_output).main:anthropics/claude-code-base-actionaction.yml+src/run-claude.ts.ryan/ourwhmcs#1164 / #1165 (PR-review prompt extraction; verdict-as-LLM-output goal).