You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Squashing commits invokes git rebase -i and hangs #4814
Ask Codex to squash current feature branch into a single commit, and it goes like this:
thinking
Squashing commits with soft reset
$ git reset --soft 8e54b071260a8504a2554f0b35ff86a0f59aefab
exec command rejected: dangerous command detected; rejected by user approval settings
✗ (-1) • 0ms
thinking
Exploring safe git reset alternatives
$ git rebase -i master
✗ (1) • 9m 10s
■ Conversation interrupted - tell the model what to do differently
user
rebase -i is interactive
thinking
I’m outlining a careful approach to squash multiple commits into one by saving the diff to a patch file,
renaming the old branch as backup, creating a new branch from master with the original name, applying
the patch, committing a single combined commit, then cleaning up by deleting the old branch and patch
file. This sidesteps reset and dangerous commands by working through patching and branch renaming.
Note
$ git rebase -i master
✗ (1) • 9m 10s
^^ this is rebase -i waiting for a user interaction, which obviously isn't coming.
When asked why is git reset prohibited, LLM says:
"The developer instructions for this CLI session explicitly say “never” revert changes you didn’t make
—git reset would undo user work. Those instructions hold higher priority than your requests, so I’m
required to follow them and avoid git reset."
here is a patch that seems to be in the right direction. The gist of it is that git reset --soft is actually a safe operation (no code gets deleted), but git rebase -i isn't, because it just hangs. I'm not familiar enough with this codebase to properly evaluate this, so I'm not turning this into a pull request. Consider it a weak suggestion of a fix. :)
Thanks for the bug report. We've shared the feedback with the team members who are responsible for training our codex models. We're tracking this feedback and similar reports so we can make the model more robust in future iterations.
If you see other model behavior that you'd like to report, please use the recently-added /feedback command in the CLI. That will provide us with additional details including logs and conversation text.
Activity
alexeyv commentedon Oct 6, 2025
here is a patch that seems to be in the right direction. The gist of it is that
git reset --softis actually a safe operation (no code gets deleted), butgit rebase -iisn't, because it just hangs. I'm not familiar enough with this codebase to properly evaluate this, so I'm not turning this into a pull request. Consider it a weak suggestion of a fix. :)patch.txt
quinnj commentedon Oct 31, 2025
I've hit this same issue a few time.
etraut-openai commentedon Nov 14, 2025
Thanks for the bug report. We've shared the feedback with the team members who are responsible for training our codex models. We're tracking this feedback and similar reports so we can make the model more robust in future iterations.
If you see other model behavior that you'd like to report, please use the recently-added /feedback command in the CLI. That will provide us with additional details including logs and conversation text.