wrong files created and broken syntax error

Resolved 💬 1 comment Opened Jun 25, 2025 by noscripter Closed Aug 7, 2025

What version of Codex is running?

0.1.2505172129

Which model were you using?

gpt-4.1

What platform is your computer?

darwin | arm64 | 24.5.0

What steps can reproduce the bug?

  • ```

find dubious codes in this project, extract, group, combine and reuse them as possible, start with one small point first
```

  • 5 reasoning | 4 tool
  • ```

find repeated code in this project, refactor to extract and reuse them, change one point at a time so as good for review
```

  • 2 reasoning | 19 tool
  • ```

yes
```

  • 1 reasoning | 4 tool
  • ```

check if there is any other duplicate code that can be reduced and reused
```

  • 1 reasoning | 31 tool
  • ```

yes
```

  • 2 reasoning | 29 tool
  • ```

yes, refactor all API functions with this helper
```

  • 2 reasoning | 13 tool
  • ```

repeat this pattern for all files in src/services
```

  • 2 reasoning | 28 tool
  • ```

right now let's just follow the existing apiFetch pattern to refactor all services matching this pattern
```

  • 3 reasoning | 6 tool
  • ```

something wrong, you accidentally introduced files ending with two quotes in the filename, and the refactored code is broken
```

  • 1 reasoning | 7 tool
  • ```

No, don't do that — stop for now.
```

  • 0 reasoning | 0 tool

What is the expected behavior?

No extra unnecessary files would be created, no broken syntax changes were made.

What do you see instead?

  • introduced some files ending with two single quotes, for example, if I have a in my project, and it is refactored following my prompts, but an extra "a''" file was created. And there were multiple such files created.
  • Syntax error in refactored code.

Additional information

_No response_

View original on GitHub ↗

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