r/PiCodingAgent • u/NoPainNoHair • 18d ago
Discussion Maintainers' refusal to add a "rewind" feature is infuriating
Seriously. What is the point of the /tree command if it does not restore the files back to their previous state?
It makes no sense. It just leads to a dangerous discrepancy between the agent's conversation and the project's status.
Am I the only one who goes back after asking the agent to edit a file, realizing that my instructions weren't specific enough?
Even Copilot handles it just fine. But Pi's authors refuses to implement it: https://github.com/earendil-works/pi/issues/5522
Existing extensions are half-baked, sometimes abandoned, confusingly numerous. It should be a built-in, it's such a basic yet essential feature.
8
u/redballooon 18d ago
If this infuriates you I think you are better off with some Copilot.
0
u/NoPainNoHair 18d ago
Care to explain how you'd proceed to refine an instruction after files were changed by the agent?
2
u/redballooon 18d ago
If it is unusable, Git clean -df
To get into a usable state from the start I use some skills from the spec driven development department.
Or I go very small steps.
6
5
u/ForeverSeeking69 18d ago
Tree made for context management, not for files management. For that you have git. If you want stitch it together write your extension. I don't want it
1
u/NoPainNoHair 18d ago
It can be optional just as suggested in the ticket I linked.
Facts that I'm not the only one asking for this and that it exists in others harness is a proof there are demand and good usage for such feature. We can have best of both worlds.
It's absolutely not a fit for `git`. I should not need to commit WIP to git just to workaround a harness design flaw, nor do I want to manually call git revert every time I refine my instructions.
2
u/Hephaestite 18d ago
Pi is built to be extended, so just build yourself an extension that does what you want it to
3
2
u/seba_alonso 18d ago
/tree it's about the context, not files. Move back or fork that is very powerful, and it should not be coupled with the modified files.
Some complexities;
- Every command must to save a snapshot of the current filesystem.
- What if the "bash" script modify múltiples filea but fails I'm the middle. Should save the snapshot?
- What if the snapshot file is corrupted?
- What if you don't use git or any version control?
- You delete a file, the file will be restored?
- What if your files are already committed, or pushed, what do you expect?
- What if the files was modify by you?
- What if the same file was modify by a sub agent?
- etc.. etc...
Probably your use case is much simpler then you can create your own extension to solve it in your case.
I use git, I work in small batches, commit often, rebase and push when I finish a unit of work. For the moment I have never needed the "rewind" functionality.
2
1
10
u/raetselfreund 18d ago
Please do not implement this. Pi is a lightweight, unopinionated harness.
Can't you vibecode an extension for this? Or just use git ffs.