Skip to content

Codex runs consistently into a stream error when using /compact #5087

Closed as duplicate

Description

@styler-ai

What version of Codex is running?

• codex-cli 0.46.0

Which model were you using?

gpt-5-codex-high

What platform is your computer?

Windows 11

What steps can reproduce the bug?

/compact

 stream error: unexpected status 400 Bad Request: {
"error": {
"message": "No tool call found for function call output with call_id call_9fuLHI3mxyYoaLpqTAYk2405.",
"type": "invalid_request_error",
"param": "input",
"code": null
}

What is the expected behavior?

That /compact compacts

What do you see instead?

 stream error: unexpected status 400 Bad Request: {
"error": {
"message": "No tool call found for function call output with call_id call_9fuLHI3mxyYoaLpqTAYk2405.",
"type": "invalid_request_error",
"param": "input",
"code": null
}

Additional information

No response

Activity

  1. added
    bug
    on Oct 11, 2025
  2. dlukt commented on Oct 13, 2025

    @dlukt

    0.46.0
    Linux

    ■ Codex ran out of room in the model's context window. Start a new conversation or clear earlier history before retrying.
    
    
    › continue
    
    
    ■ Codex ran out of room in the model's context window. Start a new conversation or clear earlier history before retrying.
    
    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }; retrying 1/5 in 217ms…
    
    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }; retrying 2/5 in 409ms…
    
    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }; retrying 3/5 in 731ms…
    
    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }; retrying 4/5 in 1.57s…
    
    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }; retrying 5/5 in 3.357s…
    
    ■ unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }
    
  3. styler-ai commented on Oct 13, 2025

    @styler-ai
    Author

    0.46.0 Linux

    ■ Codex ran out of room in the model's context window. Start a new conversation or clear earlier history before retrying.
    
    
    › continue
    
    
    ■ Codex ran out of room in the model's context window. Start a new conversation or clear earlier history before retrying.
    
    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }; retrying 1/5 in 217ms…
    
    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }; retrying 2/5 in 409ms…
    
    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }; retrying 3/5 in 731ms…
    
    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }; retrying 4/5 in 1.57s…
    
    ⚠️ stream error: unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }; retrying 5/5 in 3.357s…
    
    ■ unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_q0x1D3dj8x9F5gI4YXyht3pz.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }
    

    The thing is, if you have a log running task you are jot always able to interrupt in time. /compact should always be posssible

  4. aidogmf commented on Oct 19, 2025

    @aidogmf

    Same problem with codex-cli 0.47.0 on MacOS Sequoia 15.6.1 (Intel Core i7)

  5. jlacroix42 commented on Oct 20, 2025

    @jlacroix42

    Same problem here with codex-cli 0.47.0 on Windows 11 (WSL2 and native). gpt-5-codex-high. 10% context left, compact gives always

    unexpected status 400 Bad Request: {
      "error": {
        "message": "No tool call found for function call output with call_id call_xVhvaoDVlo3quCl5ffcZJTnr.",
        "type": "invalid_request_error",
        "param": "input",
        "code": null
      }
    }
    
  6. marked Compact tool use failing #5385 as a duplicate of this issue on Oct 20, 2025
  7. omar-hanafy commented on Oct 21, 2025

    @omar-hanafy

    Same problem here info:

    ╭────────────────────────────────────────────────╮
    │ >_ OpenAI Codex (v0.47.0)                      │
    │                                                │
    │ model:     gpt-5-codex high   /model to change │
    ╰────────────────────────────────────────────────╯
    

    MacOS: 15.6.1
    Chip: Apple M2 Pro
    Installation Method: Homebrew
    Error: unexpected status 400 Bad Request when using /compact
    Auto compact fails as well.

  8. Toltally-suck-at-code commented on Oct 25, 2025

    @Toltally-suck-at-code

    Same here. The context got full, and when I typed /compact it also led to this. It did not auto compact for me. After the error message, it resets the context back to 100% but when I send a new prompt, it tells me the context is full.

    Using WSL2 on Windows 11.

    ⚠️ stream error: unexpected status 400 Bad Request: {
    "error": {
    "message": "No tool call found for function call output with call_id call_FFqkhL94kEiJIcFoxGjuNGoL.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
    }
    }; retrying 1/5 in 210ms…

    ⚠️ stream error: unexpected status 400 Bad Request: {
    "error": {
    "message": "No tool call found for function call output with call_id call_FFqkhL94kEiJIcFoxGjuNGoL.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
    }
    }; retrying 2/5 in 375ms…

    ⚠️ stream error: unexpected status 400 Bad Request: {
    "error": {
    "message": "No tool call found for function call output with call_id call_FFqkhL94kEiJIcFoxGjuNGoL.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
    }
    }; retrying 3/5 in 826ms…

    ⚠️ stream error: unexpected status 400 Bad Request: {
    "error": {
    "message": "No tool call found for function call output with call_id call_FFqkhL94kEiJIcFoxGjuNGoL.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
    }
    }; retrying 4/5 in 1.566s…

    ⚠️ stream error: unexpected status 400 Bad Request: {
    "error": {
    "message": "No tool call found for function call output with call_id call_FFqkhL94kEiJIcFoxGjuNGoL.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
    }
    }; retrying 5/5 in 3.43s…

    ■ unexpected status 400 Bad Request: {
    "error": {
    "message": "No tool call found for function call output with call_id call_FFqkhL94kEiJIcFoxGjuNGoL.",
    "type": "invalid_request_error",
    "param": "input",
    "code": null
    }
    }

  9. added
    context
    on Nov 2, 2025
  10. etraut-openai commented on Nov 14, 2025

    @etraut-openai
    Contributor

    Closing in favor of #4813

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

    bugcontext

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions