Skip to content

[codex] Harden tool continuation history#3

Merged
HisenWeb merged 9 commits into
mainfrom
codex/p2-tool-continuation
Jun 24, 2026
Merged

[codex] Harden tool continuation history#3
HisenWeb merged 9 commits into
mainfrom
codex/p2-tool-continuation

Conversation

@HisenWeb

Copy link
Copy Markdown
Owner

Summary

  • Adds a narrow codex_chat_history helper module for tool-continuation validation.
  • Detects duplicate tool outputs before history repair.
  • Validates requested tool output call IDs against the selected stored response.
  • Validates repaired Chat history before sending it upstream.
  • Converts history replay failures into Responses-compatible failed responses instead of forwarding invalid Chat history to OpenCode Go.
  • Adds regression tests for matching, unknown, duplicate, orphan, and valid tool-history cases.

Scope

This is behavior-level hardening. It does not copy cc-switch codex_chat_history.rs one-to-one and does not introduce provider registry/session platform logic.

Validation

Not run locally in this connector environment. Recommended:

cargo fmt --check
cargo test --lib
cargo test --test state_store
cargo test --test codex_chat_history_hardening
cargo test

@HisenWeb
HisenWeb marked this pull request as ready for review June 24, 2026 20:34
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@HisenWeb
HisenWeb merged commit f116130 into main Jun 24, 2026
1 check passed
@HisenWeb
HisenWeb deleted the codex/p2-tool-continuation branch June 24, 2026 20:34
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