The Neverending Python INDENTATION Issues

Resolved 💬 1 comment Opened May 14, 2026 by sdfgsdfgd Closed May 14, 2026

What version of Codex CLI is running?

latest

What subscription do you have?

pro

Which model were you using?

gpt-5.5

What platform is your computer?

macos

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

terminal.app

Codex doctor report

What issue are you seeing?

every time apply_patch is used and a deeply indented code or space indented code is patched, AT LEAST 50% of the time codex applies an extra indent, then checks content to realise it overindented.

After 2 years, this is still happening so often.

I doubt that the issue is overestimation, there seems to be an issue with apply_patch that when it's space indented it just confuses the depth level.

40-50% failure rate is frustrating.

What steps can reproduce the bug?

refactor any 2+ level indented python code

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗