Repository navigation
fix(claude-cli): label Claude CLI turns as opencodex (carries #7837) - #8770
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24b2ab7be1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const env: Record<string, string> = { | ||
| ...baseScopedEnv(), | ||
| ...CLAUDE_CLI_QUIET_ENV, | ||
| CLAUDE_CODE_ENTRYPOINT: "opencodex", |
There was a problem hiding this comment.
Update the owning architecture docs with the entrypoint override
This changes the Claude CLI child-environment contract without updating any owning architecture documentation. src/AGENTS.md requires that “every doc listed for an area is updated in the same change that changes the area,” and structure/INDEX.md maps this adapter to documents including structure/providers-and-adapters.md and structure/providers/claude-cli-replay.md. Document the deliberate CLAUDE_CODE_ENTRYPOINT=opencodex override and its rationale in the applicable owning docs so the maintained adapter contract includes this behavior rather than leaving it only in the commit message and test.
AGENTS.md reference: src/AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
|
Maintainer integration (merge manager; carries #7837, which the owner accepted as-is in the 2026-11-15 backlog review).
|
Summary
Carries #7837 by @Peteralm (accepted as-is by the owner in the 2026-11-15 backlog review; the branch was idle since 2026-10-31).
claude -pand the Agent SDK identify assdk-cli/sdk-ts, and those entrypoints use up the Claude subscription's 5-hour window about 1.8x faster than other entrypoints for the same work (anthropics/claude-code#97074; measurements in #7837). The claude-cli adapter now setsCLAUDE_CODE_ENTRYPOINT=opencodexin the CLI child environment (src/adapters/claude-cli/adapter.ts), with #7837's regression test.The maintainer addition:
tests/providers/claude-cli-adapter.test.tspins the child environment to an exact key set derived from its two owners (baseScopedEnv()andCLAUDE_CLI_QUIET_ENV) plusUSER. #7837 failed that test on its own CI; the expected set now namesCLAUDE_CODE_ENTRYPOINTas the one deliberate addition.CLAUDE_CODE_ENTRYPOINTis also an agent-driven signal insrc/cli/agent-driven.ts, so anocxstarted from inside the Claude CLI child is treated as agent-driven — the conservative direction that consent guard wants.Closes #7837 when merged (it will be closed by hand with a pointer here).
Verification
bun test tests/providers/claude-cli-adapter.test.ts: 71 pass / 0 fail. Without the test update (the cherry-picked fix: 5h window claude sub usage limit #7837 commit alone): 70 pass / 1 fail — "carries the account name the CLI resolves its keychain sign-in by, and nothing else new".NOT RUN: full suite (host under heavy load; PR CI runs gates + test changed), live
claude -pwindow measurement (taken from #7837's report).Checklist
Co-authored-by: Peter [email protected]
Summary by CodeRabbit
opencodexentrypoint identifier in their environment.