Skip to content

[Bug]: an account change does not scrub uploaded file_id references it classifies as non-portable #4710

Description

@lidge-jun

Client or integration

Codex CLI

Area

Proxy and routing

Summary

src/server/responses/account-change-state.ts detects file_id/file_ids in a request (:85-109, :133-144) and classifies that state as non-portable across an account change (:208-218).

scrubUnportableConversationStateInPlace() then removes only previous_response_id and conversation (:152-171). A request whose only account-bound state is an uploaded file reference returns scrubbed === false and is replayed unchanged against the new account, which may not be able to read that file.

Existing tests exercise the classifier, or bodies that also contain previous_response_id; the file-only path is not covered. The gap predates 2.56.0, but it leaves the advertised safety fix of 2b43c14c03 incomplete.

Reproduction

  1. Send a pooled request that references an uploaded file by file_id and carries no previous_response_id and no provider conversation id.
  2. Cause routing to change the serving account for that turn.
  3. The request is forwarded unchanged; the new account receives a reference this module already declared account-bound.

Suggested fix: fail closed or retain the issuing account when uploaded-file references are present. If dropping them is the chosen contract, remove every detected reference explicitly and cover the file-only case through applyAccountChangeConversationStateScrub().

Version

2.56.0 (e4a8539)

Operating system

macOS 15.5

Logs or error output

(upstream may answer with an inaccessible-file error for the rotated account)

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingproxyHTTP proxy, routing, reverse-proxy / management auth

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions