Skip to content

Continue in Fresh Session

When an agent’s context is nearly full, right-click its tab and choose Continue in Fresh Session, or run it from the command palette.

  1. Cortland waits for the agent to finish its current turn, then asks it to write a handoff file to .cortland/handoffs/ in the pane’s directory. The file covers the goal, the decisions made, progress, next steps, and the files that matter.
  2. Cortland waits for the agent to start working and then finish.
  3. It opens a new tab in the same directory, running a fresh session of the same CLI, with a first prompt to read the file and carry on from the next steps.

The original tab stays open for reference. If the agent stops to ask you something, Cortland focuses its pane and opens nothing. If the agent never starts, runs longer than ten minutes, or finishes without writing the file, an alert says so and the original session is left as it was.

[handoff]
prompt = "Summarize where we are, what's left, and the files that matter into {path}."

{path} is replaced with the handoff file’s path.