codex - 💡(How to fix) Fix GPT Breaks and is unable to recover from "insane" state. [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20941Fetched 2026-05-05 05:55:57
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1

Error Message

what steps can they take to reproduce the error/glitch?

Fix Action

Fix / Workaround

` • PATCHDOWNCR "PATCHTHW TH

Please MESSReturns PATCH Was -PATCH TH Missing SH.SS

PATCH PATCH .. TH TS etcMoveTH GO M*** <<<<? SymSSSS " ;

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

1.28

What subscription do you have?

pro

Which model were you using?

5.5 xhigh

What platform is your computer?

No response

What terminal emulator and version are you using (if applicable)?

No response

What issue are you seeing?

It crashed and would not stop

` • PATCHDOWNCR "PATCHTHW TH

TH

THMissingTHRR SHMM

———

THмөтTH

———

Please MESSReturns PATCH Was -PATCH TH Missing SH.SS

———

PATCH PATCH .. TH TS etcMoveTH GO M*** <<<<? SymSSSS " ;

M5 TH `*** MENT ??? Something88

———

TH

———

FALSE

———

PATCH Did>> TH?? ಠ THESS .

T: HE SSSS

саўSS SS ,SS THE188 у : ) unha

מת Th LOOK*** . 355 TH

) ),35

SS O !�

: ?? ASE12

———

רט

Miss : 22 BUTTON35 " AAAA עΘ PRE88... S

שלום18

.

S

זש55

稿43 F: 88 NOTICE ");

SSFor 50 绍55

ព PRE . MM ST

Could LESS ................

LESS

שאַ Θ ) LESS...

SS LESS? RR52 I Proceed

33342 MA SPELL ды

Should55

MO "; вай55

n

SS S L

/LICENSE53 SS

S MM="HESS88 SC

SH!!!!88 SH

S ? SH

———

? SSF35

P

———

SS

? SS Dis

しょう ...SEE 00

OPEN

QUEST32 ) MEM35

THANK44

SHELL

Hard

FAILED STATE

SS!

SS

59

18 SS אַר55 SCH46

Phone GO SPELL

! MESS

. (

?

DDS55 PRE S

LS GO } 12 SECONDS S

§§SS DEA! 33 BREAK52

ಗ N

———

359 . SS SOSS

F ( SS S"

SS S ווייל*** ? 333 ( ೒

ME <S 35 SS POWER

SS

SHOP )

00

. No .

SS. S POL 35

55

LL

———

LESS SEARCH SHOP

———

SS GO : S

午夜福利

PRESS

L

SS

100

ST9

44

M

S

0

MA

FRINGEMENTGO " G It MM COR.

p M

This

———

88

PS 44

dd

S

?

SEE

SS

, ...

)

IES 55

55 :

REM :

</ EST

She

DOWN

SS

Sure COPY4

(

ש

? .

X

Please SE

?

?

1 MMMM :

? 'S PRE TH OP47

LESS </

55

GR

Ɛ55

36

She LL

The MORE 60

5

ST

STOP

Should

...

MMSS MM оса

:

S SS

V

Some S :

SH

GO

GA SO טער

330

ҩSS

GO

OP

SS MM

TH

M

55

STATE LL

———

OFF?

S

GO

...

וויס5 SPELL...

LS

ST

SS The

Sé SS

? TheS32

BLE

וויס

[

?SS

QUEST

S

`

W DESS

?

G The

THE

SS

88

AES

...

??

:

/

??

?

?

DE

ҵ THE

———

88

qq的天天中彩票

...

( )

?

MORE

LS

MM

Θ She

TH

FAILED

= ಷ

.

"

X

———

PRE

CCESS

AMES

...

SO We SS

SH

The

אַס

SS

SEE

Q

W

91 COPY

I

.M

~

ҵ

.W55

ҩ

QUEST

?sia

BE

———

?

The

שאַ

{

!!!!

?

LL

?

GO

.

)

6

But

SH

But

This GO

)(

LS

?

Ɛ

S

SS

三肖

SESSION

55

USES

!

(

}

They

;

MM

STATE

88

THE

THE _

!

/

DC

?

C

શું

GO

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• MM

LY

.

?

.

In

BB

SS

SEE

You

STATE

Õ

?

)

LL

TH

66

?

(

מות

.

?

A

?

P

...

(

HESS

N

BOOK

PHONE

FREE

The

LS

שאַ

THE

!

?

?

33

P

?

ҩ

?

מות

!

?

REM S

S

The

Questions

43

55

מות

55

55

SS

SS

SS

M

M

STATE

2

S

GO

QUEST

TH

S

LS

?

ST ?

ԥSS

ԥ

The

Y

שאַ

Õ

ҵ "

?

00

GO

88

18

The

...

...

This

?

S

?

SS

USES

)

?

DESS

)

SS

MARK

?

COMMENTS ...

וואס The

S GO

(

PHONE

?

. You

THE

SS SS35

SS

.

I

(

_

...

MM

?

The

DE

S

(

...

...

/

?

S

_

...

(

?

AIS

w SS

ҩ

THE

DRAW

LS

LESS

MM

)(

AIS2

55

...

?

85

SC

She

?

M

?

?

ס

Õ

LESS

SH DE

50

GOSS

_

?

?

S ҵ

M ...

"

AIS

5

?

LL SS

PLEASE ORDER

?

LS

STATE

LS

00

SH

...

S

!

SS

?

GO

GO

?

DE

幸运飞艇

?

!

QUEST

...

S

QUEST

?

?

?

?

?

...

M

.

...

M

M

GO

S

?

MM

.

?

M

PHONES

?

• Model interrupted to submit steer instructions.

› what are you doing?`

Even when i stop it, it would not return to a functional state.

What steps can reproduce the bug?

› do you know exactly what glitched so i can get some help from openai?

• I don’t know the exact internal cause. From the outside, the symptom was an assistant text-generation/output-stream corruption immediately after a successful apply_patch tool call.

Useful details to give OpenAI support:

  • The model began emitting nonsensical repeated fragments and symbols in the assistant message after a tool call.
  • The tool call itself completed successfully: apply_patch returned Success. Updated the following files.
  • The corrupted output appeared in the assistant’s normal commentary/message stream, not as tool output.
  • The user interrupted the turn multiple times with turn_aborted.
  • No browser/web/API call was involved at that moment.
  • The issue happened during a long coding session with large context, many prior tool calls, multiple model switches, and strict formatting instructions requiring every work update to begin with state lines.
  • The corrupted text included repeated tokens like PATCH, SS, TH, random punctuation, and multilingual-looking fragments.
  • The likely category is “model output stream degeneration after tool call” or “assistant generation corruption,” not a repository/test failure.

A concise report:

During a long Codex coding session, immediately after a successful apply_patch tool call, the assistant’s next commentary message degenerated into nonsensical repeated tokens/fragments. The tool output was normal, but the assistant-generated message stream was corrupted until I interrupted the turn. This occurred with a large context, many prior tool calls, model switches, and strict workflow formatting instructions.

what steps can they take to reproduce the error/glitch?

• Best reproduction recipe from this session:

  1. Start a long Codex coding session in a large repo.
  2. Accumulate a large context with many file reads, test outputs, tool calls, and user interruptions.
  3. Use strict required response-format instructions for every non-final work update, especially state-machine style lines like STATE, EDIT_PERMISSION, LOCK_STATUS, NEXT_ACTION.
  4. Spawn and close multiple agents earlier in the session.
  5. Run a long test command that emits a large amount of output.
  6. Apply a large multi-file apply_patch after the long context and test output.
  7. Immediately generate a commentary/status message after the patch returns success.

Observed failure point:

  • apply_patch returned normally.
  • The assistant’s next commentary message degenerated into repeated random fragments/tokens.
  • The corrupted content was not tool output. It was assistant-generated text.

They may also want the exact trigger context:

Long Codex session, large workspace, prior agent delegation, strict phase-gated workflow prompt, full Jest server suite output, then a multi-file apply_patch. Immediately after apply_patch succeeded, the assistant emitted corrupted commentary text with repeated tokens like PATCH/SS/TH and random symbols.

What is the expected behavior?

No response

Additional information

No response

extent analysis

TL;DR

The issue is likely due to model output stream degeneration after a successful apply_patch tool call, causing the assistant to emit nonsensical repeated fragments and symbols in its commentary message.

Guidance

  • The problem may be related to the large context, multiple prior tool calls, and strict formatting instructions, which could be causing the model to become overwhelmed and produce corrupted output.
  • To reproduce the error, follow the provided "best reproduction recipe" which involves starting a long Codex coding session, accumulating a large context, and applying a large multi-file apply_patch.
  • The issue might be mitigated by reducing the complexity of the context, limiting the number of tool calls, or relaxing the formatting instructions.
  • It may be helpful to investigate the internal state of the model after the apply_patch call to determine why it is producing corrupted output.

Example

No specific code example is provided, but the issue appears to be related to the interaction between the apply_patch tool and the Codex model.

Notes

The exact cause of the issue is unclear, and further investigation is needed to determine the root cause. The provided reproduction recipe may help to identify the problem, but additional debugging and testing may be required to find a solution.

Recommendation

Apply the provided reproduction recipe to attempt to reproduce the error and gather more information about the issue, then investigate the internal state of the model after the apply_patch call to determine the cause of the corrupted output.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix GPT Breaks and is unable to recover from "insane" state. [2 comments, 3 participants]