Repository navigation
Conversation
`packages/coding-agent/src/utils/pi-user-agent.ts` formatted `stepcode/<version> (<platform>; <runtime>; <arch>)`, and `packages/providers/src/utils/pi-user-agent.ts` formats `stepcode (<platform> <os-release>; <arch>)`. Only the second one is ever sent: every adapter under `packages/providers/src/api/` builds its `User-Agent` from it, and the first is called by nothing but its own test. It stays reachable through the package entry, though, so a reader looking for "the user agent helper" finds two functions with the same name, different formats, and no indication which one the product actually uses. Remove the dead one rather than document the trap. `packages/coding-agent/package.json` is private, so no published package loses an export. `check:coding-agent-entry-freeze` screens `bin` keys and `exports` subpaths, neither of which changes here.
liuedcson
requested review from
MelodyVAR,
Uking-xxx and
ZouR-Ma
as code owners
November 14, 2026 09:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Deletes
packages/coding-agent/src/utils/pi-user-agent.ts, its test, and the re-export atpackages/coding-agent/src/index.ts.Why
The repo carries two different
getPiUserAgentfunctions with the same name and different output:packages/coding-agent/src/utils/pi-user-agent.tsstepcode/0.84.4 (darwin; node/v24.21.0; arm64)packages/providers/src/utils/pi-user-agent.tsstepcode (darwin 25.5.0; arm64)Only the second one is ever sent over the wire. Every adapter builds its
User-Agentfrom it:packages/providers/src/api/openai-completions.ts:749packages/providers/src/api/openai-responses.ts:219packages/providers/src/api/anthropic-messages.ts:232The
coding-agentone is called by nothing but its own test:Both were touched in the same commit to align branding (
943e624b fix: brand the user agent as stepcode), but their formats were never unified — that commit only changedstep→stepcodein both.The result is a trap: the dead function is the one exported from the public package entry, so it reads as the canonical helper. A reader looking for "the user agent" finds two candidates and no signal about which one the product actually sends. Removing the dead one is cheaper than documenting the distinction.
Safety
packages/coding-agent/package.jsonis"private": true— nothing is published to npm, so no external consumer loses an export.check:coding-agent-entry-freezescreensbinkeys andexportssubpaths; neither changes here. It passed.Verification
The 6 failing tests are pre-existing and unrelated to this change — they live in
completion-check-cli.test.ts(offline-provider CLI dispatch) and fail identically onmain. A baseline run before this branch showed 8 failures (addingfooter-data-providerreftable timing andsubagent-invocation), so this branch introduces none and the flaky pair merely did not reproduce.