Repository navigation
feat(patchy): the CLI names its version, command and coding agent on every request - #540
Conversation
|
Codex review (GPT 6.1 Sol, high): round 1 Verdict: not safe to merge, with one finding.
Sol found nothing else to act on: strict parsing, compatibility, keeping the header to the instance, event propagation and docs all looked consistent. Round 2 is next. |
|
Codex review (GPT 6.1 Sol, high): round 2 Verdict: safe to merge, with no new findings. Sol confirmed that 5e440f8 fixes the Grok issue against the upstream source. The full diff passes for strict parsing, compatibility both ways, detection accuracy and order, privacy, event attribution, docs and test quality. Sol also ran its own read-only checks: header round-trips, malformed fields, all 14 markers, Grok rejection cases, and the header going only to the instance. |
5e440f8 to
ffc006f
Compare
|
Restacked onto #539 (stack: #538 → #541 → #539 → #540). New head: ffc006f. What conflicted:
Codex review (GPT 6.1 Sol, high): restack confirmation, round 3 Verdict: safe to merge, with no findings. Sol checked that both lower PRs' catalogue entries are intact and that |
Stack deploy review (GPT 6.1 Sol, high)Scope: the whole stack on No deploy blockers. Sol found no regressions in:
PostHog capture only queues and never fails a request. Sol raised two privacy findings against a stricter brief than the product's rules. Both exist on
Orchestrator's own checks, made against the code:
Made by Claude Opus 5.5 via Claude Code in T3 Code. |
844d5a4 to
08027db
Compare
…every request Every request the patchy CLI sends to an instance carries `Patchy-Cli: <release> <command> <agent>`. The command is the contract's closed `CliCommand` list, provided per command so an unnamed command that reaches the instance fails to typecheck. The agent comes from the first harness variable present, from a closed `CodingAgent` list, or `unknown`. The server parses the header where request events open: each field is kept only when it matches the release pattern or its list. The request event records `cliVersion`, `cliCommand` and `agent`, and `token.minted`, `patch.created` and `patch.updated` carry `cliVersion` and `agent` through `Analytics.CurrentCli`. A request without the header records nothing extra. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…haustively Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…profile Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ffc006f to
501106f
Compare
…ease (#556) What's new for this deploy, plus the history since the first production deploy. The thin entries #555 seeded by hand are rewritten from what each deploy actually shipped. This is the first run of `AGENTS.md` › Deploying: a fresh subagent gathered and wrote these releases, and I checked them against the PRs. **Release 4 (this deploy, `4a928f7..8697463`)** - New: **See what's new in Patchy** (#555) **Release 3 (2026-10-06, `aed1454..4a928f7`)** - Fixed: **Creating a company explains a handle it can't use** (#553) **Release 2 (2026-10-05, `48153dc..aed1454`)** - Behind the scenes: key moments are recorded, identifying people by id, never by name or email address (#538, #539, #541) - Behind the scenes: the patchy command reports its version, command and coding agent (#540) **Release 1 (2026-10-05, first production deploy, `48153dc`)** - Behind the scenes: Patchy Cloud's first release went live Made by Claude Opus 5.5 via Claude Code in T3 Code. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
We can't tell which coding agent builds patches or which CLI versions are in use. The CLI version is stored on each version row but never reaches PostHog, and the agent isn't recorded anywhere.
The CLI now names itself on every request it sends to an instance:
Patchy-Cli: <release> <command> <agent>, such asPatchy-Cli: 0.0.1 publish codex.packages/api/src/cli.ts): the release pattern (three numbers, no leading zeros), the closedCliCommandlist (every command that reaches the instance) and the closedCodingAgentlist ending inunknown, withformatPatchyCliandparsePatchyCli.docs/API.mddocuments the header in the API's description. No endpoint declares it, so no route requires or refuses it.Api.clientadds the header, so it goes only to the instance and never to another host. The command is a requiredApi.CurrentCommandservice, provided per command in the tree. A command that reaches the instance without a name fails to typecheck.CodingAgent.detectreturns the first harness whose variable is present and sends only its id, never the value. Each variable is cited from the harness's docs or source.RequestEventsparses the header where non-runtime request events open. Each field is kept only when it matches the pattern or its list, so a newer CLI's new agent still records its release. A header that isn't exactly three fields records nothing. The request event gainscliVersion,cliCommandandagent, andAnalytics.CurrentClicarries the release and agent totoken.minted,patch.createdandpatch.updated. With no header (an older CLI or a browser), nothing extra is recorded. An older server ignores the header.Agents, in detection order, each from a primary source (repo file, vendor docs or a local run):
codex(CODEX_THREAD_ID, set in every sandbox mode),cursor,gemini-cli,kilo-code(beforeopencode, which Kilo also sets),opencode,copilot-cli,grok(GROK_AGENT=1only, because people also set it to pick a profile),crush,qwen-code,pi,augment,roo-code,cline, andclaude-code(CLAUDE_CODE_CHILD_SESSION). For Claude Code, its docs sayCLAUDECODEis also set in IDE terminals people type in. It comes last because nested harnesses inherit their launcher's variables. Not included, because no harness-specific variable could be confirmed: Amp, Goose, Zed, Aider, Factory Droid, Windsurf, Warp and oh-my-pi.Hit every surface:
docs/API.md, the server and the CLI.packages/patchy/README.md(a new section with the variable table) and ADR-0004 (a header subsection). No command, flag or exit code changed, so the global skill doesn't change.Dev loop, migrations, company resources, served pages, reverse states and repo layout don't apply.
Touching #538's area: the catalogue adds
Clitotoken.minted,patch.createdandpatch.updated, without changingPublication.Tests:
<release> whoami unknownwith a clean environment andcodexwithCODEX_THREAD_IDset, and never the value.token.mintedandpatch.createdcarry the fields when the request named them, and updates without the header carry none.Privacy page: allisonmahmood/patchy-web#23 (ships in the same release; not merged with this).
Closes #537
Made by Claude Opus 5.5 via Claude Code in T3 Code.