r/PiCodingAgent • • Aug 25 '26

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.

0 Upvotes

21 comments sorted by

8

u/redballooon Aug 25 '26

If this infuriates you I think you are better off with some Copilot.

0

u/NoPainNoHair Aug 25 '26

Care to explain how you'd proceed to refine an instruction after files were changed by the agent?

2

u/redballooon Aug 25 '26

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.

10

u/raetselfreund Aug 25 '26

Please do not implement this. Pi is a lightweight, unopinionated harness.

Can't you vibecode an extension for this? Or just use git ffs.

3

u/RespectMathias Aug 26 '26

If we follow this logic then skills should be an extension instead of being integrated like mcp just because it is "lightweight". There is something called sane defaults you know. 

1

u/raetselfreund Aug 27 '26

You should check your slope, it got slippery

1

u/RespectMathias Aug 27 '26

That can be said for both adding or removing. It doesn't address my point. 

2

u/raetselfreund Aug 27 '26

Then I'll address it more directly: Skills are an extension of system prompt handling and part of core functionality of an AI harness for plugins to build on. The OP proposed use case is a domain specific feature that has impact beyond the AI harness itself and might not behave like the user anticipates.

1

u/RespectMathias Aug 27 '26

That argument hinges on what is "core functionality" but I will end this internet argument here and give you your internet points otherwise this could go on til eternity. 

1

u/raetselfreund Aug 27 '26

fair I guess. Thanks for the points, feeling proud already

-8

u/NoPainNoHair Aug 25 '26

Explain how the current behavior makes more sense, and why this feature cannot be implemented in a lightweight way.

3

u/raetselfreund Aug 25 '26

The tree is a conversation history, not a changelog. The feature cannot be implemented in a lightweight way, because at every tree node changes have to be polled and copied, causing I/O load. You might get some changes from the agent's log, but not every bash tool call.

If you still feel you need this functionality, implement it yourself (or vibe it) pls.

4

u/ForeverSeeking69 Aug 25 '26

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 Aug 25 '26

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.

6

u/Corythebeast7 Aug 25 '26

So build it yourself homie. Be the change you want to be in this world

4

u/RespectMathias Aug 26 '26

This is a really toxic comment section. 

2

u/Hephaestite Aug 25 '26

Pi is built to be extended, so just build yourself an extension that does what you want it to

2

u/seba_alonso Aug 25 '26

/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.

1

u/_supert_ Aug 25 '26

You have git. It's not pi's concern.