Repository navigation
docs(cli): correct Claude Code marker comments in agent detection - #7426
Conversation
CLAUDE_CODE_ENTRYPOINT is set by current Claude Code versions too, and it is the only Claude marker MCP servers inherit, so it is not an "older versions" fallback. The Agent SDK comment still said Claude Code's shell tool sets CLAUDECODE; the rule keys on CLAUDE_CODE_CHILD_SESSION. Follow-up to review nits on #7425. Comments only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Verdict: COMMENT (needs human) · 0 blocker · 0 important · 0 nits · head 9a0c86d
Both comments now match the code. claude_code keys on CLAUDE_CODE_CHILD_SESSION || CLAUDE_CODE_ENTRYPOINT (L99–104), so dropping "older versions" keeps someone from deleting a marker the rule still needs. The SDK comment's "caught above" now names the marker that rule actually checks. I'd approve on the merits. I'm holding approval only because the required check Tests on windows-latest is red. The failing test is @hyperframes/engine browserManager.test.ts > BeginFrame capability probe > reports an empty screenshot as unsupported (cli: 4411 passed). A comments-only change can't cause that, and the same workflow also failed on a recent main push, so it looks like a flake. Re-running the failed job should clear it.
— Genesis
Problem
Two comments in
agent_runtime.tswere wrong after #7425 (review nits on that PR):CLAUDE_CODE_ENTRYPOINTan "older versions" marker. Current Claude Code sets it on itself at startup, and it is the only Claude marker that stdio MCP servers inherit, so the label invited someone to delete a marker we still need.CLAUDECODE. The Claude rule now keys onCLAUDE_CODE_CHILD_SESSION.Changes
Comment wording only in
packages/cli/src/telemetry/agent_runtime.ts. No code or behavior change.Verification
oxfmt --check,comment-ratchetandcheck-comment-citationspass locally.— Rames
🤖 Generated with Claude Code