Commit e019a21
authored
ci: also pass CLAUDE_CODE_OAUTH_TOKEN via step env (#697)
The pin-only fix was insufficient — same versions (claude-code-action
v1.0.107, agent-sdk 0.2.120, claude-cli 2.1.119) that succeeded earlier
in the day started failing with `Could not resolve [authentication]`.
Confirmed locally that the OAuth token from the GitHub secret works with
`claude --print` from a clean HOME using only the
CLAUDE_CODE_OAUTH_TOKEN env var, so the token and Anthropic backend are
fine. The breakage is in how the agent SDK's query() forwards env to the
spawned Claude Code child process.
parse-sdk-options.ts builds the child env from `{ ...process.env }`, so
the safest forwarding path is to set CLAUDE_CODE_OAUTH_TOKEN on the step
itself rather than relying on the `with:` input. The `with:` value is
kept for backwards-compatibility with the action's own bookkeeping.1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
0 commit comments