I think codex has done something along the line: https://github.com/openai/codex/pull/6041

But it is trying to use git as a backend to save file states, and at the same time NOT showing it in the user's git history.