Skip to content

fix(proxy): suppress duplicate side-effect tool calls - #586

Merged
Soju06 merged 56 commits into
Soju06:mainfrom
Komzpa:fix/suppress-duplicate-side-effect-tool-calls
May 17, 2026
Merged

Soju06 merged 56 commits into
Soju06:mainfrom
Komzpa:fix/suppress-duplicate-side-effect-tool-calls

Conversation

@Komzpa

@Komzpa Komzpa commented May 12, 2026 •

Copy link
Copy Markdown
Collaborator

Draft split from #555.

Purpose

  • Suppress replayed side-effect tool-call events in the HTTP stream path, including replays that change call_id.
  • Keep independent downstream responses scoped by response_id so separate turns are not suppressed as duplicates.
  • Rewrite duplicate nested side-effect operations inside multi_tool_use.parallel before forwarding the batch to the client.
  • Limit input-history side-effect dedupe to previous-response replay/continuity payloads, not first-attempt list inputs.

Validation

  • Rebased on current main.
  • ruff format --check, ruff check, and ty check on touched backend/test files passed locally.
  • Focused pytest for downstream tool-call dedupe, HTTP stream replay, same-response replay, and previous-response input replay passed locally.
  • Exact-head GitHub CI is green for 172f032bb306a712119a29ee157a0ce5d6fd6060.
  • Fresh @codex review completed for 172f032bb306a712119a29ee157a0ce5d6fd6060; no inline review comments were reported.

Relationship

@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: 6a337e6aa9

ℹ️ 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 app/modules/proxy/service.py Resolved
Comment thread app/modules/proxy/service.py Resolved
@Komzpa
Komzpa force-pushed the fix/suppress-duplicate-side-effect-tool-calls branch from 6a337e6 to 5911be5 Compare May 12, 2026 02:43
@Soju06

Soju06 commented May 12, 2026

Copy link
Copy Markdown
Owner

Thanks @Komzpa -- the side-effect tool-call dedupe is exactly the right shape (per-response id cache, side-effect allowlist, multi_tool_use.parallel nested rewriting, distinct read-only / later-response-id calls intact), and the OpenSpec change folder is in place. The 566 lines of unit coverage are also a great safety net. Codex review picked up two issues that should land before merging.

P1 -- wait_agent dedupe must not raise on malformed targets

app/modules/proxy/service.py:~8653 calls sorted(targets) on tool-call payload that is model-generated JSON. If the model emits functions.wait_agent with mixed-type targets (or any otherwise non-comparable list), sorted raises TypeError and aborts the whole stream-processing path. That converts what's supposed to be a best-effort dedupe into a hard stream failure on input the proxy has no control over.

Suggested fix: feature-detect comparability, or just sort safely with a key that's always comparable, then fall back to the original list on failure:

def _normalize_wait_agent_targets(targets):
    if not isinstance(targets, list):
        return targets
    try:
        return sorted(targets, key=lambda t: (t.__class__.__name__, str(t)))
    except (TypeError, ValueError):
        return list(targets)  # fall through; dedupe is best-effort

And a regression to pin behavior:

def test_wait_agent_dedupe_tolerates_mixed_type_targets():
    parallel = {
        "call_id": "call_x",
        "name": "multi_tool_use.parallel",
        "arguments": json.dumps({
            "tool_uses": [
                {"recipient_name": "functions.wait_agent", "parameters": {"targets": [1, "a", {}]}}
            ]
        }),
    }
    # should not raise, should forward the event unchanged (or at worst with a no-op dedupe)
    result = _maybe_dedupe_parallel_tool_use(parallel, dedupe_cache={})
    assert result is not None

P2 -- normalize top-level exec_command / write_stdin keys before dedupe

The top-level side-effect path keys on the raw arguments string:

# app/modules/proxy/service.py:~8619
dedupe_key = (call_name, arguments_str)

while the nested multi_tool_use.parallel path already strips volatile fields (yield_time_ms, max_output_tokens, etc.) before keying. That asymmetry defeats the dedupe in the exact replay scenario this PR is targeting:

  • Same response_id, same exec_command body, but a replayed event with yield_time_ms: 5000 vs yield_time_ms: 6000 -> two distinct keys -> both events forwarded -> command executed twice.

Suggested fix: share the volatile-field-stripping helper between the top-level and nested paths, and key on the normalized arguments dict (or its canonical-JSON dump):

_SIDE_EFFECT_VOLATILE_ARG_KEYS = frozenset({"yield_time_ms", "max_output_tokens", "timeout_ms"})

def _side_effect_dedupe_key(call_name: str, arguments: dict) -> str:
    operative = {k: v for k, v in arguments.items() if k not in _SIDE_EFFECT_VOLATILE_ARG_KEYS}
    return f"{call_name}::{json.dumps(operative, sort_keys=True, separators=(',', ':'))}"

Then both top-level (exec_command/write_stdin) and the parallel inner-dedupe use the same function.

Test to pin:

def test_top_level_exec_command_dedupes_across_yield_time_ms_differences():
    # same response_id, two events with identical exec_command `command` but different `yield_time_ms`
    state = _make_dedupe_state(response_id="resp_a")
    first = _exec_event(call_id="call_a", command="echo hi", yield_time_ms=5000)
    second = _exec_event(call_id="call_b", command="echo hi", yield_time_ms=6000)
    assert _consume_side_effect_event(first, state) is not None      # forwarded
    assert _consume_side_effect_event(second, state) is None         # suppressed

Not blocking otherwise

  • Scope (split from fix(proxy): trim Codex websocket full-replay continuations #555) is clean.
  • Cache limit (_WEBSOCKET_TOOL_CALL_DEDUPE_CACHE_LIMIT = 1024) is reasonable for per-response keying and won't grow unbounded.
  • Allowlist for side-effect tool names is conservative -- read-only calls and later-response ids are still passed through.

After the P1 fix and (ideally) the P2 normalization land, I'll re-run @codex review and queue for merge.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@Komzpa
Komzpa force-pushed the fix/suppress-duplicate-side-effect-tool-calls branch 5 times, most recently from 7beee93 to df2d161 Compare May 13, 2026 11:11
@Komzpa
Komzpa requested a review from Soju06 as a code owner May 15, 2026 06:41
@Komzpa
Komzpa force-pushed the fix/suppress-duplicate-side-effect-tool-calls branch 2 times, most recently from ef140e6 to 19cc805 Compare May 15, 2026 08:10
@Soju06

Soju06 commented May 15, 2026

Copy link
Copy Markdown
Owner

@codex review

@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: beeb2d7fa6

ℹ️ 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 app/modules/proxy/service.py Resolved
@Soju06

Soju06 commented May 15, 2026

Copy link
Copy Markdown
Owner

@codex review

1 similar comment
@Komzpa

Komzpa commented May 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: d9717421dd

ℹ️ 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 app/modules/proxy/tool_call_dedupe.py Resolved
@Soju06

Soju06 commented May 15, 2026

Copy link
Copy Markdown
Owner

@Komzpa second-round @codex review on d971742 confirms the reconnect-survival fix is correct (session.seen_tool_call_keys is now session-scoped, the regression test_http_bridge_tool_call_dedupe_survives_upstream_reconnect reproduces and pins the reconnect path). Good.

One new P1 from this round to address before merge — found at app/modules/proxy/tool_call_dedupe.py:278 inside dedupe_replayed_side_effect_input_items:

call_keys.get(index) returning None immediately continues, which leaves the previous side-effect key active; a later write_stdin/exec_command with the same canonical args is then treated as a replay and removed even if a read-only tool call happened in between.

Concretely, today the loop only resets first_call_id_by_key / last_side_effect_key on replayed_input_segment_boundary(item). A non-boundary, non-side-effect item (a read_file / search / a tool output between two write_stdin calls) returns key=None and we continue without touching the state, so the next side-effect call with the same canonical key matches last_side_effect_key and gets dropped.

Failure mode in production: in a mixed turn side-effect → read-only → same-args side-effect, the second legitimate operation gets removed and the tool-call/output pair desyncs for the continuation request. This is exactly the class of bug the dedupe is supposed to prevent, except inverted (dropping real work instead of duplicate work).

Suggested fix — reset the side-effect chain state whenever the current item is not a side-effect tool call:

for index, item in enumerate(input_items):
    if isinstance(item, dict) and replayed_input_segment_boundary(item):
        first_call_id_by_key.clear()
        last_side_effect_key = None
    key = call_keys.get(index)
    if key is None:
        last_side_effect_key = None   # <-- non-side-effect breaks the replay chain
        continue
    # ... existing side-effect logic

(first_call_id_by_key is keyed on canonical side-effect identity and survives correctly across a single read-only item; only last_side_effect_key needs to clear, because it encodes "the immediately previous side-effect operation".)

Regression to pin:

def test_dedupe_replayed_side_effect_keeps_repeat_after_read_only_intermission():
    """side-effect A -> read-only R -> side-effect A (same args) must keep both A's."""
    input_items = [
        _function_call("call_a1", name="write_stdin", arguments=json.dumps({"chars": "hi"})),
        _function_call_output("call_a1", output="ok"),
        _function_call("call_r",  name="read_file", arguments=json.dumps({"path": "/tmp/x"})),
        _function_call_output("call_r", output="..."),
        _function_call("call_a2", name="write_stdin", arguments=json.dumps({"chars": "hi"})),
        _function_call_output("call_a2", output="ok"),
    ]
    result, removed = dedupe_replayed_side_effect_input_items(input_items)
    assert removed == 0
    assert [item.get("call_id") for item in result if isinstance(item, dict)] == [
        "call_a1", "call_a1", "call_r", "call_r", "call_a2", "call_a2",
    ]

(Adjust the _function_call* helpers to match the existing test scaffolding; the assertion shape is what matters.)

Pair it with the existing test_dedupe_replayed_side_effect_collapses_repeat_with_same_args to make sure the "drop the byte-identical adjacent replay" path still fires when there's no read-only item in between.

After this lands I'll re-run @codex review and queue for merge.

@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: d9717421dd

ℹ️ 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 app/modules/proxy/tool_call_dedupe.py Resolved
@Komzpa
Komzpa force-pushed the fix/suppress-duplicate-side-effect-tool-calls branch from d971742 to bdabc3e Compare May 15, 2026 12:16
@Komzpa

Komzpa commented May 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: bdabc3e60b

ℹ️ 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 app/modules/proxy/service.py Resolved
@Komzpa
Komzpa force-pushed the fix/suppress-duplicate-side-effect-tool-calls branch 2 times, most recently from 9f989b9 to de39ff8 Compare May 15, 2026 13:30
@Komzpa
Komzpa marked this pull request as draft May 15, 2026 13:31
@Komzpa

Komzpa commented May 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: de39ff8f81

ℹ️ 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 app/modules/proxy/tool_call_dedupe.py Resolved
@Komzpa
Komzpa force-pushed the fix/suppress-duplicate-side-effect-tool-calls branch from de39ff8 to f6aa1c6 Compare May 15, 2026 13:48
@Komzpa Komzpa removed the 🤖 codex: needs work [@codex review] raised an issue label May 16, 2026
@Komzpa

Komzpa commented May 16, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 0eaa54075d

ℹ️ 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 app/modules/proxy/service.py Outdated
Comment on lines +10416 to +10417
if _websocket_input_item_type(item) in {"function_call_output", "custom_tool_call_output"}
),

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 Handle apply_patch replay items when trimming prior-response input

Extend the replay-prefix trimming logic to recognize apply_patch_call / apply_patch_call_output items; currently the scan at _trim_websocket_previous_response_input_items only treats function_call_output and custom_tool_call_output as output boundaries, so follow-up requests whose prior turn used apply_patch are left untrimmed and resend full prior assistant/tool history. In websocket continuity flows this can reintroduce duplicate side-effect calls or trigger avoidable missing_tool_output failures because stale tool-call items are forwarded instead of being trimmed to outputs.

Useful? React with 👍 / 👎.

@Komzpa Komzpa added the 🤖 codex: needs work [@codex review] raised an issue label May 16, 2026
@Komzpa Komzpa removed the 🤖 codex: needs work [@codex review] raised an issue label May 16, 2026
@Komzpa

Komzpa commented May 16, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 6f1fc948b2

ℹ️ 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 app/modules/proxy/service.py Outdated
Comment on lines +6523 to +6526
grouped_previous_response_request_states = _pop_matching_websocket_request_states(
pending_requests,
_all_pending_websocket_followup_requests(pending_requests),
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Scope missing-tool-output fallback to matching requests

When missing_tool_output cannot be matched by response_id/hint, this fallback pops all pending follow-up requests, not just the affected continuity chain. If a bridge/socket has multiple queued requests with different previous_response_id values, one upstream continuity error will incorrectly fail unrelated requests as stream_incomplete, creating user-visible cross-request blast radius.

Useful? React with 👍 / 👎.

Comment thread app/modules/proxy/tool_call_dedupe.py Outdated
Comment on lines +129 to +132
# Same-response replays have shown distinct call_ids for byte-identical shell/edit requests.
# For local side-effect tools, running the same payload twice is worse than dropping a duplicate-looking call_id.
dedupe_call_id = None if is_side_effect_tool_call else call_id
if is_side_effect_tool_call:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve call_id in side-effect duplicate detection

This change intentionally discards call_id for side-effect dedupe, so two distinct tool calls with identical arguments in the same response collapse to one key and the later call is suppressed. Since Responses streams can legitimately emit multiple calls for the same tool in one turn, argument-only dedupe can drop valid operations and force a synthetic terminal failure even when no replay occurred.

Useful? React with 👍 / 👎.

@Komzpa Komzpa added the 🤖 codex: needs work [@codex review] raised an issue label May 16, 2026
@Komzpa Komzpa removed the 🤖 codex: needs work [@codex review] raised an issue label May 16, 2026
@Komzpa

Komzpa commented May 16, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 4a7e33095e

ℹ️ 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 on lines +5701 to +5706
if mark_duplicate_tool_call_downstream_event(
payload,
seen_tool_call_keys=session.seen_tool_call_keys,
response_id=tool_call_response_id_from_payload(payload) or matched_request_state.request_id,
scope_side_effects_by_response_id=False,
):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Scope HTTP-bridge tool-call dedupe to a response

Using scope_side_effects_by_response_id=False with the session-level cache causes side-effect tool calls from later responses to be treated as duplicates of earlier turns on the same HTTP bridge session. This is reproducible when one turn ends after a side-effect response.output_item.done (no non-side-effect item clears the cache) and the next turn legitimately issues the same tool operation: the second call is suppressed and the turn can be rewritten to stream_incomplete. That violates per-response isolation and breaks normal repeated tool workflows.

Useful? React with 👍 / 👎.

@Komzpa Komzpa added the 🤖 codex: needs work [@codex review] raised an issue label May 16, 2026
@Komzpa Komzpa removed the 🤖 codex: needs work [@codex review] raised an issue label May 16, 2026
@Komzpa

Komzpa commented May 16, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

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

@Komzpa Komzpa added the 🤖 codex: ok [@codex review] says no issues found. label May 16, 2026
@Soju06
Soju06 merged commit bc5d1bd into Soju06:main May 17, 2026
18 checks passed
Soju06 added a commit that referenced this pull request May 17, 2026
Archive changes shipped in v1.18.0 and v1.18.1 per AGENTS.md
"release 이후 archive" workflow. All 12 changes verified shipped in
production at 10.0.0.113 (image 1.18.1, sha256:0431a474432d).

1.18.0 (9 changes):
- deactivate-on-token-expired (#600)
- drop-unknown-message-fields (#637)
- mask-single-http-previous-response-miss (#516)
- normalize-v1-responses-openai-sdk-stream (#639)
- start-device-oauth-polling (#635) [delta header fixed: MODIFIED -> ADDED]
- support-prolite-plan-capacity (#558) [delta header fixed: MODIFIED -> ADDED]
- treat-upstream-overloaded-as-retryable (#601)
- validate-password-length (#598)
- validate-strict-function-tool-schema (#658)

1.18.1 (3 changes):
- harden-long-codex-websocket-turns (#586)
- suppress-duplicate-side-effect-tool-calls (#586)
- hotfix-db-pool-pre-ping-and-firewall-cache-ttl (#679)

Specs updated: 9 capabilities (admin-auth, api-firewall, chat-completions-compat,
chat-completions-extensions, database-backends, frontend-architecture,
responses-api-compat, usage-refresh-policy).

openspec validate --specs: 19/19 passed.

Co-authored-by: Hermes Agent <[email protected]>
vitalNohj pushed a commit to vitalNohj/codex-lb that referenced this pull request Jul 17, 2026
* fix(proxy): relax Codex long-turn timeouts

* fix(proxy): penalize websocket upstream drops

* docs(openspec): document long Codex websocket turns

* fix(proxy): avoid penalizing rejected websocket input

* fix(proxy): treat upstream websocket errors as terminal

* fix(proxy): keep downstream streams alive during upstream stalls

* fix(types): satisfy stream keepalive checks

* fix(proxy): bound websocket stream idle stalls

* fix(proxy): preserve stream startup errors

* fix(proxy): keep stream startup failover

* fix(proxy): keep websocket fail-closed terminal

* fix(proxy): preserve bridge startup errors

* fix(proxy): raise default stream idle timeout

* fix(proxy): avoid continuity helper merge conflicts

* fix(proxy): place trim logging after bridge state

* fix(proxy): address long-turn review blockers

* fix(proxy): omit turn state on bridge startup errors

* fix(proxy): keep stream error frames best effort

* fix(proxy): suppress duplicate side-effect tool calls

* fix(proxy): mask missing tool output continuity errors

* fix(proxy): fail closed suppressed stream tool calls

* fix(proxy): keep read-only parallel tool calls

* fix(proxy): trim overlapping parallel tool replays

* fix(proxy): propagate trimmed parallel tool events

* fix(proxy): retire unsafe bridge after tool dedupe

* fix(proxy): preserve malformed tool input errors

* fix(proxy): dedupe replayed side-effect input history

* test(proxy): expect side-effect replay suppression

* fix(proxy): keep bridge tool dedupe across reconnects

* fix(proxy): dedupe direct side-effect tool replays

* fix(proxy): narrow side-effect replay dedupe

* fix(proxy): fail closed unmatched tool-output gaps

* fix(proxy): finish side-effect replay review fixes

* fix(proxy): make duplicate tool-call guard stack-friendly

* fix(proxy): avoid reservation-touch merge conflicts

* fix(proxy): leave reservation touch insertion room

* fix(proxy): keep write waits distinct in dedupe

* fix(proxy): narrow missing tool replay matching

* fix(proxy): tighten side-effect replay dedupe

* style(proxy): format dedupe helpers

* test(proxy): document cross-response replay suppression

* fix(proxy): satisfy typed replay suppression test

* fix(proxy): retain side-effect dedupe replay window

* fix(proxy): make replay suppression stack-compatible

* test(proxy): align previous-response reconnect expectations

* fix(proxy): drain typeless upstream errors after tool-output matching

* fix(proxy): keep websocket keepalives on real responses

* fix(proxy): avoid duplicate bridge health penalties

* fix(proxy): leave bridge quota penalties to replay branch

* fix(proxy): honor prehandled stream health errors

* fix(proxy): normalize typeless websocket errors

* fix(proxy): trim apply-patch replay prefixes

* fix(proxy): scope continuity and tool replay dedupe

* fix(proxy): preserve distinct tool call ids

* fix(proxy): scope bridge tool dedupe per request

* fix(proxy): isolate bridge tool dedupe state
vitalNohj pushed a commit to vitalNohj/codex-lb that referenced this pull request Jul 17, 2026
…u06#682)

Archive changes shipped in v1.18.0 and v1.18.1 per AGENTS.md
"release 이후 archive" workflow. All 12 changes verified shipped in
production at 10.0.0.113 (image 1.18.1, sha256:0431a474432d).

1.18.0 (9 changes):
- deactivate-on-token-expired (Soju06#600)
- drop-unknown-message-fields (Soju06#637)
- mask-single-http-previous-response-miss (Soju06#516)
- normalize-v1-responses-openai-sdk-stream (Soju06#639)
- start-device-oauth-polling (Soju06#635) [delta header fixed: MODIFIED -> ADDED]
- support-prolite-plan-capacity (Soju06#558) [delta header fixed: MODIFIED -> ADDED]
- treat-upstream-overloaded-as-retryable (Soju06#601)
- validate-password-length (Soju06#598)
- validate-strict-function-tool-schema (Soju06#658)

1.18.1 (3 changes):
- harden-long-codex-websocket-turns (Soju06#586)
- suppress-duplicate-side-effect-tool-calls (Soju06#586)
- hotfix-db-pool-pre-ping-and-firewall-cache-ttl (Soju06#679)

Specs updated: 9 capabilities (admin-auth, api-firewall, chat-completions-compat,
chat-completions-extensions, database-backends, frontend-architecture,
responses-api-compat, usage-refresh-policy).

openspec validate --specs: 19/19 passed.

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

Labels

🤖 codex: ok [@codex review] says no issues found.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants