Engineers on GitHub issue #30364 report that GPT-5.5 Codex sometimes produces worse code than its predecessor. The suspected cause is reasoning-token clustering: the model groups intermediate reasoning tokens into tight clusters, leading to repetitive or truncated outputs.
What is reasoning-token clustering?
GPT-5.5 Codex uses chain-of-thought reasoning before generating code. These reasoning tokens are stored in a buffer. When the model clusters these tokens too densely, it loses diversity in the reasoning path. Instead of exploring multiple solution strategies, it fixates on a narrow pattern.
Example from the issue: a user asked Codex to implement a binary search tree delete function. GPT-5.5 output:
def delete(self, key):
if self.root is None:
return
self.root = self._delete(self.root, key)
def _delete(self, node, key):
if node is None:
return None
if key < node.key:
node.left = self._delete(node.left, key)
elif key > node.key:
node.right = self._delete(node.right, key)
else:
if node.left is None:
return node.right
if node.right is None:
return node.left
temp = self._min_value_node(node.right)
node.key = temp.key
node.right = self._delete(node.right, temp.key)
return node
This looks correct. But the user reported that the model repeated the same pattern for three different test cases, ignoring edge cases like deleting a node with two children where the successor has its own right child. The reasoning tokens likely clustered around the standard algorithm, skipping the necessary recursion adjustment.
How does clustering degrade performance?
Clustering reduces the effective reasoning depth. The model reuses token sequences from earlier in the generation, causing output homogenization. In code generation, this manifests as:
- Repeated variable names across unrelated functions.
- Missing error handling because the reasoning path skipped alternative branches.
- Shorter, less robust code because the model converges to a local optimum.
A benchmark by a contributor showed that GPT-5.5 Codex scored 12% lower on the HumanEval+ test suite compared to GPT-4 Codex when the prompt required multi-step reasoning. The clustering effect was more pronounced for prompts longer than 2000 tokens.