Skip to main content
Browse docs

Delete, clean up and continue agent tasks

What happens to agent tasks when you leave, how to archive and delete them, how cleanup of archived tasks frees task slots, and how to read or continue a past task from Task history.

On this page

Agent tasks live in your workspace runtime, not in your browser, so they keep their place until you delete them. Use this page when you want to tidy up the task list, free a task slot, or pick up work you deleted earlier. For the rest of the dashboard, see Use the Agents dashboard.

Tasks keep going without you

You can leave the Agents page, close the browser, sign out or switch devices while an agent works. When you come back, your tasks are in the list with their conversations, and pins follow you to every browser. Notifications tell you when a task needs you or has finished.

If the runtime restarted during a conversation, the task shows "Conversation saved · reconnect with a follow-up". Send a message and the agent carries on with the same conversation.

Your task settings, such as what happens after a submission merges, are saved to your account and follow you to every device. Remove unused tasks is the exception: it is saved in each browser.

Archive a task

Archiving moves a task you've finished with out of the way without deleting it. Archived tasks sit in Archived, a closed group at the foot of the task list, and they are the only tasks cleanup can remove (see below).

  • Choose Archive in the task's ⋯ menu in the list, or in the open task's ⋯ menu.
  • Point at a task in the list and press E, or press E with a task open. The open task is archived and the next task below it opens. Undo on the "Archived" notice takes it back.
  • With a mouse, drag a task onto Archived.
  • To archive every finished task at once, choose Archive all finished with the number of tasks, in the filter panel of the task list or in the command palette. It archives the tasks in Done in your current view, except pinned ones.

Choose Archived to open the group. The heading shows how many tasks it holds, and a small branch mark with a number counts archived tasks whose changes aren't merged. To bring a task back, choose Unarchive in its ⋯ menu, point at it and press E again, or drag it out of the group. Sending an archived task a message brings it back by itself.

Archiving is personal: only you see a task as archived, and it still counts toward your task limit until it is cleaned up or deleted.

Delete a task

Choose the trash button (Delete Task) in the task header, or Close task from the task's ⋯ menu or the command palette. You can also delete a task without opening it: in the task list, Delete Task is at the bottom of the task's ⋯ menu, and on a computer the summary that opens when you point at a task has a trash icon in its bottom corner. None of these are available while the task is being submitted.

1904 first checks the task for work that isn't merged yet. A task with nothing to lose, such as one where you only asked a question, is deleted straight away.

Otherwise a dialog asks you to confirm. If the task has uncommitted changes, unpushed commits or work not confirmed merged, it says so and offers Review / PR so you can submit the work first. Delete agent and changes stops the agent and permanently removes its worktree and local branch, so uncommitted files and work that exists only in the task are lost. Remote branches and pull requests are kept. When nothing would be lost, the button reads Delete agent.

Deleting never removes the conversation. It stays in Task history, where you can read it or continue it in a new task (see below).

Tick Never ask again to delete tasks without the dialog from then on. To get the dialog back, turn off Skip the removal confirmation under Advanced in Settings > Tasks. A crew chief that still has open workers always asks, and you must tick the confirmation that its workers and their uncommitted work go with it.

The task leaves the list as soon as removal starts. If removal fails, it comes back with the error and a Review task or Check removal status button.

If 1904 can no longer find the task, the dialog instead asks whether to remove it from the task list. Remove from task list takes it off the list in this browser. Nothing else is deleted, and any files and conversation data are kept.

For apps that use direct development, the dialog is Close instead: Close agent stops the agent once all work is saved and pushed, and the app's code, branch and files are always kept.

You can also close a task as part of submitting it: pick Submit & close in Quick Submit, or choose Clean up agent in the review window after the change merges. See Preview, review and merge an agent's work.

Read or continue a past task

Task history lists the chat tasks you deleted, closed or that were cleaned up, newest first, with their conversations. Their worktrees are gone, so continuing one starts a new task rather than reopening the old one.

Settings, Task history for the Field Notes app with two past tasks, one with its conversation open, and Read, Continue and Delete buttons

  1. Open Task history: the history button at the top of the task list, Task history at the bottom of the New Task dialog, or Settings > Task history.
  2. If you have more than one app, choose the app. Use Search tasks… to find a task by its title, first message or agent.
  3. Choose Read to see the conversation. Load earlier messages goes further back in a long one.
  4. Choose Continue to start a new task titled "Continue" and the old task's name, with the same agent, model, effort and target branch. The earlier conversation is attached to your first message in the new task, the same way Existing Task attaches one.

Task history shows only your own tasks, and only chat tasks in which you sent at least one message. To remove one for good, choose Delete, then Delete permanently. That removes the conversation only; commits and pull requests are not affected.

If the page says "Update this app's runtime to see its task history.", the app's runtime is older than this feature.

Saved copies from before Task history

Before Task history, archiving a task saved a copy of its files. This is different from the Archived group in the task list. If you archived tasks that way, they appear under Saved copies from before Task history on the same page, for that app. Each keeps its files, including uncommitted ones. Restore opens it as a task again; its dependencies may need reinstalling. Delete, then Delete permanently, removes it and its uncommitted files; pushed commits are kept. The section disappears once an app has none left.

Task settings

Settings > Tasks holds these choices, from the top of the page:

  • Create PR walkthroughs, under PR walkthroughs: Off, All or Important, for every app in the workspace. Only a workspace owner can change it.
  • Let agents discover other tasks, under Agent discovery: lets each agent search other tasks in the same app that the person who started it can see. It shares titles, status, file names and pull request and check summaries, never conversations or diffs. It's off until a workspace owner turns it on.
  • New tasks start in, under New tasks: the permission mode a task you start begins in, for every agent or for each agent on its own. If your workspace's Admin sets how agents run, this section says so instead.
  • After a submission merges: Keep working or Close task.
  • Confirm before submitting: shows the Submit dialog so you can choose for each task. Turn it off to submit straight away with the choice above.
  • Stop idle agents after, under Idle agents: stops a task's agent after this long without work, from 5 minutes to 4 hours (5 minutes unless you change it), to free memory on your runtime. The conversation stays as it is, and your next message, or typing in the task, starts the agent again.
  • Compact idle threads: when 1904 compacts an idle Claude conversation over 200,000 tokens: When you return, Before the cache expires (beta) or Never, which is the default.
  • Resume after usage limits: see Use the Agents dashboard.
  • Preview apps hosted outside 1904: see Preview, review and merge an agent's work.
  • Move inactive tasks to Done: moves a task into Done after 1, 3, 7, 14 or 30 days with no message, no agent work and no file changes (After 7 days unless you change it, or Off). A task with uncommitted files, an open pull request, a pin or a snooze is never moved. A task in Done is kept as it is, and a new message brings it back.
  • Clean up merged tasks and Clean up inactive tasks: see below.
  • Remove unused tasks: removes a task you opened and never used, with no messages and no file changes, after the time you choose (After 30 minutes unless you change it, or Never). A task you have open, or with a message you've started writing, is kept.
  • Skip the removal confirmation, under Advanced: deletes tasks without asking.
  • Share product usage analytics, under Privacy & usage tracking at the bottom of the page: whether 1904 records how you use it, such as the agent and model you pick, the permission mode, how long a run takes, token counts, which named controls you click, and your operating system and device. Prompts, responses, code, file names and credentials are never recorded. Whether it starts on or off depends on your region and on whether your browser sends a Global Privacy Control signal, and the row says which applies to you. Turning it off stops the recording at once. The info icon beside the switch lists everything that is and isn't recorded.

Automatic cleanup

Every open task holds one of the dashboard's 100 places, so 1904 can clean up finished tasks for you. Cleanup only ever touches tasks you have archived (see Archive a task above). Tasks in Done, and any other task you haven't archived, are never cleaned up. Both settings are off unless you turn them on:

  • Clean up merged tasks closes an archived task once its changes have landed and it has been quiet for the time you choose, After 1 hour unless you change it. A task with uncommitted or unpushed work, or one you marked important, is never closed.
  • Clean up inactive tasks removes an archived task after the number of days without activity you choose, from 1 to 60, but only when nothing would be lost: no uncommitted files and no commits that have not landed. A task you marked important is kept, and a snoozed task is left alone until it wakes. A task with linked apps is removed only when every linked app's part also has no uncommitted files, no open pull request and no work that has not landed; on an app whose runtime predates this check, such a task is kept.

Tasks you haven't archived, pinned tasks, tasks shared in a team space, editor sessions, direct sessions, a linked app's part of a task, and tasks whose agent is working, waiting for you or was active in the last few minutes are never cleaned up automatically. Cleanup runs every 15 minutes while the app's runtime is running. You get a notification for each task it closes ("Finished task closed") or removes ("Inactive task removed"), and the conversation stays in Task history.

To clean up now, go to Clean up now in Settings > Tasks, below the cleanup settings, and choose Check now. It lists what would be closed or removed, in every app, before anything changes; choose Clean up with the number of tasks to go ahead, or Cancel. Check now is available only while at least one of the two cleanup settings is on.

Clean up several tasks at once

When the task list has filled up with finished work, you can pick the tasks to clear from the list itself. This works whether or not the two automatic settings are on.

  1. Once you're close to the task limit, the foot of the task list shows how many task slots are used or left. Choose Clean up beside that count. At the limit, Clean up finished tasks in the warning next to New task opens the same view.
  2. The list changes to Choose tasks to clean up and 1904 checks the tasks in your current view. Only finished tasks you have archived can be ticked, and each says why, such as "Changes merged" or that it has been inactive for the number of days set under Clean up inactive tasks with nothing to lose. The rest are listed under "kept · Not finished or protected", each with its reason, such as "Only archived tasks can be cleaned up."
  3. Tick the tasks to remove, or Select all. Shift+click ticks a range. The count at the bottom shows how many tasks you'll have afterward.
  4. Choose Clean up with the number of tasks, check the list, then choose Confirm cleanup. Keep selecting goes back.

Cleanup then runs in the background, so you can close the view and keep working. The foot of the task list shows how far it has got, with Details to open the view again. When it finishes, the same line says how many tasks were cleaned up and how many were kept, with History to open Task history and Dismiss to clear the line.

A task that changed after it was checked is kept. Crew chiefs with open pieces are always kept here, and so is a task with linked apps while one of those apps still has uncommitted files, an open pull request or work that has not landed, or can't be checked. Delete those from the task itself. The conversations stay in Task history, and the conversation you have open stays usable while you choose.

The task limit

The dashboard holds 100 tasks and terminal tabs at a time. As you get close, the foot of the task list shows how many task slots are used, and then how many are left. When you reach the limit, it reads "Task limit reached", New task is unavailable and a warning icon explains why. Delete a task, close a terminal tab, or choose Clean up finished tasks from the warning to start a new one.