explaingit

dzshzx/codexcomp

Analysis updated 2026-05-18

125PythonAudience · developerComplexity · 3/5LicenseSetup · easy

TLDR

A local proxy that detects and fixes a truncation bug in gpt-5.5 responses used by the OpenAI Codex CLI, delivering complete answers instead of cut off ones.

Mindmap

mindmap
  root((repo))
    What it does
      Fixes Codex truncation bug
      Local proxy on 127.0.0.1
      Folds reasoning rounds
    Tech stack
      Python
      WebSocket transport
      SSE fallback
    Use cases
      Fix broken Codex answers
      Run as background service
      Debug via health endpoint
    Audience
      Developers using Codex

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Fix incomplete or cut off answers from Codex CLI when using the gpt-5.5 model.

USE CASE 2

Run a local proxy that automatically continues and merges truncated reasoning into one clean response.

USE CASE 3

Set up automatic startup of the proxy so it is always running when you use Codex.

What is it built with?

PythonWebSocketSSE

How does it compare?

dzshzx/codexcompagentic-commerce-lab/pawlnekocode/filetree-skill
Stars125125125
LanguagePythonPythonPython
Setup difficultyeasyeasyeasy
Complexity3/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires the uv tool installer and an existing Codex CLI installation with ChatGPT login.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

codexcomp is a small local proxy that fixes a specific bug in OpenAI's Codex command line tool. When Codex uses the gpt-5.5 model, its reasoning sometimes gets cut off partway through at a predictable token count, and the tool then answers based on that incomplete thought, which lowers the quality of the response. The project's own data suggests this happens in a large share of responses that reach the affected token count. The tool runs on your own computer and sits between Codex and OpenAI's servers. When it detects a truncated response, instead of passing the broken answer along, it asks the model to keep reasoning, then combines the extra rounds into one complete answer before sending it back to Codex. From the user's point of view, Codex simply receives a full, untruncated response instead of a broken one. Setup is a single command to install the tool, followed by adding one line to a Codex configuration file that points Codex at the local proxy instead of directly at OpenAI. No changes to how Codex identifies itself or organizes its sessions are needed, so features like remote conversation compaction keep working normally. The proxy uses a fast connection method matching what Codex expects, and falls back to a more compatible connection method if needed. The project also includes some resilience features: if the connection to OpenAI's servers gets stuck or times out, the proxy automatically resets the connection instead of failing every request until restarted. It never stores or logs your login credentials, only forwards them, and only listens on your own machine rather than the network. There is also an optional command to make the proxy start automatically when your computer boots.

Copy-paste prompts

Prompt 1
Walk me through installing codexcomp and pointing my Codex CLI config at it.
Prompt 2
Explain how codexcomp detects the 518n minus 2 truncation pattern and continues the response.
Prompt 3
Help me set up codexcomp as a background service on Linux using systemd.
Prompt 4
Show me how to check codexcomp's health endpoint to confirm it is working correctly.

Frequently asked questions

What is codexcomp?

A local proxy that detects and fixes a truncation bug in gpt-5.5 responses used by the OpenAI Codex CLI, delivering complete answers instead of cut off ones.

What language is codexcomp written in?

Mainly Python. The stack also includes Python, WebSocket, SSE.

What license does codexcomp use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is codexcomp to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is codexcomp for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.