Skip to content

Rename references to Agent Code - #3

Merged
Juliusolsson05 merged 2 commits into
mainfrom
rename/agent-code
May 12, 2026
Merged

Juliusolsson05 merged 2 commits into
mainfrom
rename/agent-code

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Summary

  • Rename host-app references from cc-shell to Agent Code
  • Move test/debug env names to CODEX_HEADLESS_* with CC_SHELL_* compatibility aliases
  • Align proxy testing docs and helper labels with the new app name

Verification

  • Covered by parent app build in rename/agent-code-full

…dy + request_shape

Codex's proxy events used to fly through EventEmitter only — no
on-disk record. The Claude proxy has had `proxy-events.jsonl` since
day one and that's been load-bearing for forensic work against debug
bundles ("what was the actual prompt that triggered this leak?").
Codex needs the same capability, in the same on-disk shape, so a
single bundle-inspection tool can read either provider without
branching.

Three additions, all gated on a new `eventsFile?: string` option that
defaults to undefined (existing testing harness callers see no
change):

1. ResponsesProxy.emit() override mirrors every emitted event into
   the JSONL file when configured. Done at emit (not in each handler)
   so any current or future event kind lands on disk consistently.
   Buffer-typed values (response-chunk's raw upstream bytes) get
   substituted with a base64 sidecar at JSON.stringify time so the
   mirror file stays human-decodable without forcing all callers to
   pre-encode.

2. The `request` event payload gains:
     - headers       filtered to an allowlist (x-codex-*,
                     x-openai-subagent, user-agent, content-length,
                     content-type, openai-beta). Authorization is
                     structurally excluded so the file is safe to
                     ship in a debug bundle.
     - body_b64      raw request body up to a 2 MiB cap (matches
                     Claude's mitmAddon for symmetry).
     - request_shape pre-parsed metadata: model, instructions_chars,
                     input_items_count, tools_count, has_reasoning.
                     Forensic-only today; future predicate work has
                     a structured slot to read from.

3. CodexResponsesAdapter tightens its endpoint filter from
   `path.includes('/responses')` (which substring-matched
   /responses/compact too) to the typed `endpoint === 'responses'`
   label the proxy already emits. Falls back to the legacy substring
   check when an older proxy doesn't send `endpoint`. Either way,
   /responses/compact, /memories/trace_summarize, /realtime/calls,
   /models, and unclassified /v1/ paths no longer touch the
   active-flow attribution state machine.

Allowlist sources: vendor/codex-src/codex-rs/core/src/client.rs
(build_responses_options, build_subagent_headers,
build_responses_identity_headers).
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