Fork, rewind, or archive a session
Branch off a second line of work, take the conversation back to an earlier message, or put a finished session away.
Sessions rarely go in a straight line. You might want to try a second approach without losing the first, change what you asked the agent a few messages ago, or tidy away work that’s done. These three actions cover that.
Fork a session
Forking copies a session so you can take it somewhere new while the original carries on unchanged. The copy has the conversation so far, the repositories, the settings, and the files. You own the copy, and a fork of a private session is private too.
-
Open the menu
In the session’s header, open the ⋯ menu and choose Fork session….
-
Say what the fork should do
The Fork this session dialog asks What should the fork do? Your answer becomes the fork’s first task.
-
Bring people along, if you want
If others are on the session, the checkbox Add the other person on this session to the fork (or the same with a count) adds them to the copy as collaborators. Leave it off and no one else is added to the fork.
-
Choose Fork
Evergreen opens the new session.
The menu offers Fork session… to the people who can message the agent, once the session has merged or been canceled, or once the agent has a conversation to copy. When the original’s plan is approved, the fork works from that plan and doesn’t plan again. When the original is still planning, the fork plans for itself. If the agent is in the middle of a turn, the copy takes the conversation as it was at the end of the last finished turn.
On a merged session, the card above the message box also has Start a follow-on session instead. With it on, your next message starts a follow-on: a copy of the session with the same conversation, owned by you, with its own branches and pull requests. Continue this session instead switches back. On a canceled session, the button beside the message box reads Start follow-on, and your message starts a follow-on session.
To fork from an earlier point instead, choose Fork from here on one of your messages. Your message’s words go into the message box and the send button reads Fork. Nothing happens until you send. The new session starts from the conversation before that message, plus what you write. The original session stays as it is, and Esc cancels. If the session began with a plan, a fork from an earlier message plans again.
In the terminal, evergreen fork <session> <task> forks a session, and evergreen fork --from <n> forks from one of your messages.
Rewind the conversation
Rewinding takes the conversation back to before one of your messages so you can say it differently. It’s the way to change direction without starting over.
-
Choose Rewind to here
Find one of your messages and choose Rewind to here. You can also press Esc twice in the message box, which opens the Rewind to list. Use the arrow keys to pick a message and Enter to choose it.
-
Write what you want instead
The message box shows the original words and the hint Rewound to before this message. Send to continue from here, or press Esc to bring back the rest of the conversation.
-
Send
The agent continues from that point.
What came after the message isn’t deleted. It stays as another version of the conversation. Where the paths split, Earlier version and Later version buttons with a count such as 1/2 let you look at the other one. Sending a message while you’re viewing a version continues that version.
In the terminal, evergreen rewind lists the messages you can rewind to, evergreen rewind --to <n> rewinds, and evergreen versions lists the other versions.
Warning
A rewind moves the conversation, not the code. The agent’s work in the repositories, including its commits and branches, stays as it is, and the agent is told so. If you want the code to change too, tell the agent in your message.
A few things hold a rewind back.
- While the agent is working, rewinding would stop its turn, so the button waits until the turn ends. Switching versions waits too.
- You can’t rewind a merged or canceled session. A merged session’s next message carries on in the same session on fresh branches, and a canceled session’s starts a follow-on session. You can still choose Fork from here to start a new session from any of your messages.
- Messages sent before Evergreen supported rewinding have no Rewind to here or Fork from here, and neither do messages in a session whose agent can’t rewind.
Archive a session
Archiving puts a settled session away. It hides the session from Sessions, from search, and from counts for everyone. Nothing is deleted, and the people who could open the session can still open it from its link.
You can archive a session that has finished, whether it merged, was marked completed, failed, or was canceled. The session’s owner or an organization admin can do it.
-
Open the menu
In the session’s header, open the ⋯ menu and choose Archive session…. Rows in the session list also have an Archive action.
-
Confirm
The dialog Archive this session? repeats what happens. Choose Archive session, or Keep it to back out.
To find archived sessions, open the View menu on the Sessions page and turn on Show archived. They appear most recently archived first. Choose Restore on a row, or Unarchive session from the session’s own menu, to bring one back into the lists and counts. In the terminal, evergreen archive and evergreen unarchive do the same, for one session or several.
A session that is still running can’t be archived. If you don’t need it any more, open the menu and choose Abandon session…. The agent stops and the session is canceled for everyone, and then you can archive it. If you just want to stop being part of someone else’s session, choose Leave session… instead. It keeps running for the others.
Last updated