Skip to content

feat(trace): switch --trace backend from claude-trace to cctrace - #399

Merged
lroolle merged 3 commits into
mainfrom
feat/cctrace-trace-396
Jul 8, 2026
Merged

feat(trace): switch --trace backend from claude-trace to cctrace#399
lroolle merged 3 commits into
mainfrom
feat/cctrace-trace-396

Conversation

@lroolle

@lroolle lroolle commented Jul 8, 2026

Copy link
Copy Markdown
Member

Close #396

claude-trace's fetch hook only sees /v1/messages and is dead on native Claude binaries. cctrace MITM-captures the full surface (messages, OAuth, usage/credits, MCP) and auto-detects npm vs native installs. Snapshots land in .cctrace/ in the workspace mount.

  • run cctrace --no-open -- <claude args>; entrypoint injects --dangerously-skip-permissions after the first --
  • compile the cctrace standalone binary at image build; bun's CLI eats a leading --, the compiled binary receives argv directly
  • install bun system-wide via BUN_INSTALL=/usr/local; the old /root/.bun symlink was unusable by the deva user
  • rename pin CLAUDE_TRACE_VERSION -> CCTRACE_VERSION=0.4.0 across versions.env, Makefile, Dockerfiles, CI workflows, registry
  • docs: Request Tracing section in advanced-usage.md
  • fix(ci): CCX_VERSION build-arg was never passed (dead ATLAS_CLI_VERSION wiring) — released images pinned ccx from Dockerfile ARG defaults

🤖 Generated with Claude Code

lroolle and others added 3 commits July 7, 2026 20:21
claude-trace's fetch hook only sees /v1/messages and is dead on
native Claude binaries. cctrace MITM-captures the full surface
(messages, OAuth, usage/credits, MCP) and auto-detects npm vs
native installs. Snapshots land in .cctrace/ in the workspace.

- run `cctrace --no-open -- <claude args>`; entrypoint injects
  --dangerously-skip-permissions after the first "--"
- compile the cctrace standalone binary at image build; bun's CLI
  eats a leading "--", the compiled binary receives argv directly
- install bun system-wide via BUN_INSTALL=/usr/local; the old
  /root/.bun symlink was unusable by the deva user
- rename pin CLAUDE_TRACE_VERSION -> CCTRACE_VERSION=0.4.0 across
  versions.env, Makefile, Dockerfiles, CI workflows, and registry

Close #396

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- version-pins.sh and resolve-tool-versions.sh emit ccx_version;
  every atlas_cli_version output was empty, so ATLAS_CLI_VERSION
  matched no Dockerfile ARG and ccx silently pinned to the ARG
  default instead of versions.env

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 8, 2026 03:21
@claude-yolo

claude-yolo Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @lroolle's task in 1s —— View job


I'll analyze this and get back to you.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the --trace request-tracing backend from @mariozechner/claude-trace to @thevibeworks/cctrace, updates version pinning/labels accordingly, and adjusts image/tooling build/install paths (including installing bun system-wide) so tracing works for both npm and native Claude installs.

Changes:

  • Rename CLAUDE_TRACE_VERSIONCCTRACE_VERSION across version pins, labels, scripts, tests, Make targets, and CI workflows.
  • Update Claude wrappers/entrypoint wiring so --trace runs cctrace --no-open -- <claude args> and traces persist to .cctrace/.
  • Add cctrace installation via compiled standalone binary (bun build --compile) in agent tooling install flow.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
versions.env Replace claude-trace pin with CCTRACE_VERSION.
tests/version-upgrade.sh Update expected labels, mock registry entries, and build-arg expectations for cctrace.
tests/test_release_utils.sh Update tool registry expectations to include cctrace instead of claude-trace.
scripts/version-upgrade.sh Switch CLI override + build-arg wiring from claude-trace to cctrace.
scripts/version-pins.sh Update pinned-variable list and GitHub outputs to include CCTRACE_VERSION.
scripts/update-version-pins.sh Update pin refresh to fetch cctrace from npm instead of claude-trace.
scripts/toolchain-report.sh Report CCTRACE_VERSION in toolchain report output.
scripts/test-version-targets.sh Update version-target tests for CCTRACE_VERSION.
scripts/test-install-agent-tooling.sh Extend installer test harness to fake bun + cctrace pack/build/install.
scripts/release-utils.sh Replace tool registry entry for claude-trace with cctrace.
scripts/install-agent-tooling.sh Remove claude-trace install; add cctrace compile+install step via bun.
Makefile Rename build args/overrides to CCTRACE_VERSION; exclude .cctrace/ in context sizing.
docs/custom-images.md Update build-arg examples for cctrace (and still contains outdated atlas arg name).
docs/advanced-usage.md Add Request Tracing section documenting .cctrace/ behavior and invocation.
Dockerfile.rust Rename build arg and image label from claude-trace to cctrace.
Dockerfile Install bun system-wide; rename build arg + image label from claude-trace to cctrace.
docker-entrypoint.sh Update tracing wrapper handling from claude-trace to cctrace and inject DSP after --.
deva.sh Update help/example comment to reference cctrace tracing.
DEV-LOGS.md Add devlog entry documenting the switch and new tracing behavior.
claude.sh Switch local + docker trace wrapper from claude-trace to cctrace invocation.
CHANGELOG.md Document the switch to cctrace and bun install behavior.
agents/claude.sh Switch agent wrapper behavior to cctrace --no-open -- ... model.
.github/workflows/release.yml Rename outputs/build args from claude-trace/atlas to cctrace/ccx.
.github/workflows/nightly-images.yml Rename outputs/build args from claude-trace/atlas to cctrace/ccx.
.github/workflows/ci.yml Update smoke build args/env wiring for cctrace/ccx.
.dockerignore Ignore .cctrace/ artifacts.
Comments suppressed due to low confidence (2)

docs/custom-images.md:78

  • This doc still instructs passing ATLAS_CLI_VERSION as a build arg, but the codebase (Makefile, workflows, version pins) uses CCX_VERSION now. Keeping the old arg name here will lead users to pass a build-arg that the Dockerfiles no longer consume.
  --build-arg CLAUDE_CODE_VERSION="$CLAUDE_CODE_VERSION" \
  --build-arg CCTRACE_VERSION="$CCTRACE_VERSION" \
  --build-arg CODEX_VERSION="$CODEX_VERSION" \
  --build-arg GEMINI_CLI_VERSION="$GEMINI_CLI_VERSION" \
  --build-arg ATLAS_CLI_VERSION="$ATLAS_CLI_VERSION" \
  --build-arg COPILOT_API_VERSION="$COPILOT_API_VERSION" \

docs/custom-images.md:97

  • Same issue as above: the Rust image build example still uses ATLAS_CLI_VERSION, but the build arg is CCX_VERSION.
  --build-arg BASE_IMAGE=deva-local:core \
  --build-arg CLAUDE_CODE_VERSION="$CLAUDE_CODE_VERSION" \
  --build-arg CCTRACE_VERSION="$CCTRACE_VERSION" \
  --build-arg CODEX_VERSION="$CODEX_VERSION" \
  --build-arg GEMINI_CLI_VERSION="$GEMINI_CLI_VERSION" \
  --build-arg ATLAS_CLI_VERSION="$ATLAS_CLI_VERSION" \
  --build-arg PLAYWRIGHT_VERSION="$PLAYWRIGHT_VERSION" \

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread claude.sh
FINAL_ARGS=("--include-all-requests" "--run-with" "${CLAUDE_ARGS[@]}")
if command -v "$CCTRACE_PATH" >/dev/null 2>&1; then
CLAUDE_CMD="$CCTRACE_PATH"
FINAL_ARGS=("--" "${CLAUDE_ARGS[@]}")
Comment thread docker-entrypoint.sh
Comment on lines +373 to +377
local has_dsp=false has_sep=false
for arg in "$@"; do
if [ "$arg" = "--dangerously-skip-permissions" ]; then
has_dsp=true
break
elif [ "$arg" = "--" ]; then
@lroolle
lroolle merged commit a0e3b8d into main Jul 8, 2026
6 checks passed
@lroolle
lroolle deleted the feat/cctrace-trace-396 branch July 8, 2026 03:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9fc499e60

ℹ️ 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".

Comment thread agents/claude.sh
AGENT_COMMAND+=("--run-with")
# Use cctrace wrapper: captures everything by default,
# claude args go after "--"
AGENT_COMMAND=("cctrace" "--no-open" "--")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Force base-url tracing for Copilot auth

When this wrapper is used with --auth-with copilot, setup_claude_auth below exports ANTHROPIC_BASE_URL to the HTTP Copilot proxy, but this unconditional cctrace --no-open -- ... lets cctrace auto-select its default MITM mode for native Claude. That mode only routes HTTPS traffic via the proxy, so Claude's HTTP Copilot requests bypass cctrace and deva.sh claude --auth-with copilot -- --trace runs without capturing the LLM calls. Please force cctrace's base-url mode (before the --) for the Copilot/custom-base-url path.

Useful? React with 👍 / 👎.

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.

Switch --trace default from claude-trace to cctrace

2 participants