Golang uses tabs not spaces
What version of Codex is running?
codex-cli 0.27.0
Which model were you using?
gpt-5 medium
What platform is your computer?
Linux 6.15.9-arch1-1 x86_64 unknown
What steps can reproduce the bug?
Ask it to write any code in go. It will produce all the code formatted with spaces for indentation instead of tabs. THis goes against the go conventions and causes all the default linters to fail. Codex isnt smart enough to fix the model output using go fmt or gofumt so it wastes a lot of tokens writing the code out the first time using spaces and then re-editing all its changes to turn them back into tabs to make the linters happy.
What is the expected behavior?
Ideally the model should write gocode using spaces and not tabs but failing that codex/the model should know about the standard go lang tooling and use it to fix formatting problems instead of doing it all itself.
What do you see instead?
Spaces instead of tabs
Additional information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗