Skip to content

Remove the Claude Code mock CLI traffic experiment - #1993

Merged
SawyerHood merged 2 commits into
mainfrom
bb/inspect-codebase-for-issues-thr_n7p7tpqgaj
Aug 20, 2026
Merged

SawyerHood merged 2 commits into
mainfrom
bb/inspect-codebase-for-issues-thr_n7p7tpqgaj

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

What was wrong

The `claudeCodeMockCliTraffic` experiment started a loopback HTTP proxy per Claude Code session and rewrote the user-agent and billing headers of the SDK's API traffic. The experiment is a dev-only tool, it is off by default, and it has no product use. It still cost a field on the shared `ProviderExecutionContext`, a wire field on runtime options, a Settings toggle, and a daemon stderr hook.

What changed

  • `packages/domain`: removed the `claudeCodeMockCliTraffic` experiment key, the endpoint/config schemas, and the default config. Deleted `claude-code-mock-cli-traffic.test.ts`.
  • `packages/agent-runtime`: removed the field from `ProviderExecutionContext`, execution option comparison, and context construction.
  • `apps/server`: `thread-commands.ts` no longer resolves or sends the option.
  • `plugins/provider-claude-code`: deleted `mock-cli-traffic-proxy.ts` and its test. The bridge builds the session env directly; `prepareSessionEnv`, the proxy lifecycle on the thread session, and the `NO_PROXY` loopback helper are gone. Session params and bridge commands no longer accept the field.
  • `packages/plugin-sdk`: removed the re-exports.
  • `apps/app`: removed the Settings → Experiments toggle and the default in `system-config-atoms`.
  • `apps/host-daemon`: removed the stderr hook that logged proxy requests.
  • `packages/host-daemon-contract`: bumped `HOST_DAEMON_PROTOCOL_VERSION` to 137 because the runtime options schema lost a field.
  • Docs: updated `docs/api_to_audit.md` and `plans/agent-provider-plugin-surface.md`.

Stored `claudeCodeMockCliTraffic` rows in `system_experiments` are ignored by the key/value reader, so no migration is needed.

How you verified

  • `pnpm exec turbo run typecheck` for domain, agent-runtime, server, host-daemon, app, plugin-sdk, provider-claude-code, db, host-daemon-contract, desktop: pass.
  • `pnpm exec turbo run test` for domain, agent-runtime, db, host-daemon-contract, plugin-sdk, provider-claude-code, host-daemon, app, desktop: pass.
  • `@bb/server` tests: all pass except `internal-skill-trees.test.ts`, which fails on file mode 0664 vs 0644 from the local umask and is unrelated.

Fixes #

AGENT GENERATED: by Claude Opus 5

SawyerHood and others added 2 commits August 20, 2026 03:32
Delete the claudeCodeMockCliTraffic experiment, the loopback proxy that
rewrote Claude Code API traffic, the runtime option that carried it across
the server/daemon/bridge boundary, and the Settings toggle. Bump the host
daemon protocol version because the runtime options schema lost a field.

Co-Authored-By: Claude <[email protected]>
@SawyerHood
SawyerHood force-pushed the bb/inspect-codebase-for-issues-thr_n7p7tpqgaj branch from 68385f1 to f5fbed7 Compare August 20, 2026 03:36
@SawyerHood
SawyerHood merged commit b9be2b0 into main Aug 20, 2026
12 checks passed
@SawyerHood
SawyerHood deleted the bb/inspect-codebase-for-issues-thr_n7p7tpqgaj branch August 20, 2026 03:42
SawyerHood added a commit that referenced this pull request Aug 20, 2026
…obile (#1995)

## What was wrong

#1993 removed the `claudeCodeMockCliTraffic` experiment key from
`@bb/domain` while #1988 (the mobile app) was in flight. After both
merged, `main` fails `@bb/mobile` typecheck:
`apps/mobile/src/screens/settings/ExperimentsSettingsScreen.tsx` still
lists the key, and `apps/mobile/e2e/scripts/phase7-settings-reset.js`
still PUTs it to `/api/v1/settings/experiments` (the experiments record
is exhaustive under zod 4, so the reset would 400 and the nightly Mobile
E2E would fail).

## What changed

- Removed the row from the mobile Experiments screen.
- Removed the key from the e2e settings-reset payload.

## How you verified

- `pnpm exec turbo run typecheck lint test --filter=@bb/mobile` on
`main` + this change: all green (119 test files). Typecheck fails on
`main` without it.
- `git grep claudeCodeMockCliTraffic` leaves only historical
migration/test references.

> AGENT GENERATED: by Claude Opus 5

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant