Skip to content

Commit c9ec2b0

Browse files
ashwin-antclaude
andauthored
fix: set CLAUDE_CODE_ENTRYPOINT for SDK path to match CLI path (#791)
Previously, the SDK path would result in the CLI setting the entrypoint to 'sdk-ts' internally, while the non-SDK (CLI) path would correctly set it to 'claude-code-github-action' based on the CLAUDE_CODE_ACTION env var. This change explicitly sets CLAUDE_CODE_ENTRYPOINT in both: 1. The action.yml env block (for consistency) 2. The SDK options env (to override the CLI's internal default) The CLI respects pre-set entrypoint values, so this ensures consistent user agent reporting for both execution paths. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
1 parent 63ea7e3 commit c9ec2b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

base-action/src/parse-sdk-options.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ export function parseSdkOptions(options: ClaudeOptions): ParsedSdkOptions {
212212
if (process.env.INPUT_ACTION_INPUTS_PRESENT) {
213213
env.GITHUB_ACTION_INPUTS = process.env.INPUT_ACTION_INPUTS_PRESENT;
214214
}
215+
// Ensure SDK path uses the same entrypoint as the CLI path
216+
env.CLAUDE_CODE_ENTRYPOINT = "claude-code-github-action";
215217

216218
// Build system prompt option - default to claude_code preset
217219
let systemPrompt: SdkOptions["systemPrompt"];

0 commit comments

Comments
 (0)