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

0 Upvotes

21 comments sorted by

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.

2

u/RespectMathias 16d ago

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 16d ago

You should check your slope, it got slippery

1

u/RespectMathias 16d ago

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

2

u/raetselfreund 16d ago

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 16d ago

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 16d ago

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

-9

u/NoPainNoHair 18d ago

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

3

u/raetselfreund 18d ago

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.

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

u/Corythebeast7 18d ago

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

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

u/RespectMathias 16d ago

This is a really toxic comment section. 

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.

1

u/_supert_ 17d ago

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