Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ inputs:
description: "Additional arguments to pass directly to Claude CLI"
required: false
default: ""
task_budget:
description: "API-side token budget (total tokens). When set, the model is made aware of its remaining budget and can pace its tool use accordingly. Maps to the SDK taskBudget.total option (@alpha)."
required: false
default: ""
additional_permissions:
description: "Additional GitHub permissions to request (e.g., 'actions: read')"
required: false
Expand Down Expand Up @@ -298,6 +302,7 @@ runs:
INPUT_PATH_TO_CLAUDE_CODE_EXECUTABLE: ${{ inputs.path_to_claude_code_executable }}
INPUT_PATH_TO_BUN_EXECUTABLE: ${{ inputs.path_to_bun_executable }}
INPUT_SHOW_FULL_OUTPUT: ${{ inputs.show_full_output }}
INPUT_TASK_BUDGET: ${{ inputs.task_budget }}
DISPLAY_REPORT: ${{ inputs.display_report }}
INPUT_PLUGINS: ${{ inputs.plugins }}
INPUT_PLUGIN_MARKETPLACES: ${{ inputs.plugin_marketplaces }}
Expand Down
5 changes: 5 additions & 0 deletions base-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ inputs:
description: "Additional arguments to pass directly to Claude CLI (e.g., '--max-turns 3 --mcp-config /path/to/config.json')"
required: false
default: ""
task_budget:
description: "API-side token budget (total tokens). When set, the model is made aware of its remaining budget and can pace its tool use accordingly. Maps to the SDK taskBudget.total option (@alpha)."
required: false
default: ""

# Authentication settings
anthropic_api_key:
Expand Down Expand Up @@ -166,6 +170,7 @@ runs:
INPUT_PROMPT_FILE: ${{ inputs.prompt_file }}
INPUT_SETTINGS: ${{ inputs.settings }}
INPUT_CLAUDE_ARGS: ${{ inputs.claude_args }}
INPUT_TASK_BUDGET: ${{ inputs.task_budget }}
INPUT_PATH_TO_CLAUDE_CODE_EXECUTABLE: ${{ inputs.path_to_claude_code_executable }}
INPUT_PATH_TO_BUN_EXECUTABLE: ${{ inputs.path_to_bun_executable }}
INPUT_SHOW_FULL_OUTPUT: ${{ inputs.show_full_output }}
Expand Down
1 change: 1 addition & 0 deletions base-action/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ async function run() {
allowedTools: process.env.INPUT_ALLOWED_TOOLS,
disallowedTools: process.env.INPUT_DISALLOWED_TOOLS,
maxTurns: process.env.INPUT_MAX_TURNS,
taskBudget: process.env.INPUT_TASK_BUDGET,
mcpConfig: process.env.INPUT_MCP_CONFIG,
systemPrompt: process.env.INPUT_SYSTEM_PROMPT,
appendSystemPrompt: process.env.INPUT_APPEND_SYSTEM_PROMPT,
Expand Down
3 changes: 3 additions & 0 deletions base-action/src/parse-sdk-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ export function parseSdkOptions(options: ClaudeOptions): ParsedSdkOptions {
// Direct options from ClaudeOptions inputs
model: options.model,
maxTurns: options.maxTurns ? parseInt(options.maxTurns, 10) : undefined,
taskBudget: options.taskBudget
? { total: parseInt(options.taskBudget, 10) }
: undefined,
allowedTools:
mergedAllowedTools.length > 0 ? mergedAllowedTools : undefined,
disallowedTools:
Expand Down
1 change: 1 addition & 0 deletions base-action/src/run-claude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type ClaudeOptions = {
allowedTools?: string;
disallowedTools?: string;
maxTurns?: string;
taskBudget?: string;
mcpConfig?: string;
systemPrompt?: string;
appendSystemPrompt?: string;
Expand Down
1 change: 1 addition & 0 deletions src/entrypoints/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ async function run() {
model: process.env.ANTHROPIC_MODEL,
pathToClaudeCodeExecutable: claudeExecutable,
showFullOutput: process.env.INPUT_SHOW_FULL_OUTPUT,
taskBudget: process.env.INPUT_TASK_BUDGET,
});

claudeSuccess = claudeResult.conclusion === "success";
Expand Down