---
title: Agents that run for hours
description: An agent that works for hours needs to ask without stopping, a claim that holds while it works, and a way back in after a restart. Hamloy is that list.
url: https://hamloy.com/use-cases/long-running-agents
---

[Use case](https://hamloy.com/use-cases)

# Agents that run for hours

Give an agent a long job and walk away. It asks what's yours to decide without stopping, writes down what only you can do, and a restart picks up where it left off.

A long run fails in small ways. The agent hits a decision that's yours and either stops to wait or guesses. It needs an API key and leaves a sentence in its scrollback you will never read. The session crashes, and the next one starts from nothing, or finds its own task "taken" by a session that no longer exists.

Hamloy gives a long-running agent four things.

## Ask without stopping

A decision that's yours becomes a question with options and the one the agent recommends. If other work doesn't depend on it, the agent carries on with that. If everything does, it can assume an answer and go on:

```
⏺ hamloy - Assume an answer (MCP)(key: "Q-is21", option: 1)
  ⎿ Q-is21@2 Where should synced habits live? options: 1) Supabase: Postgres
    with auth and row-level security built in (recommended, assumed) 2) Our own
    Postgres on Fly.io 3) iCloud only, no server
```

The question stays open, marked assumed, until you confirm or overturn it. Answer it hours later, from the board on any machine, or on your phone on the train. The agent hears your answer under its next tool reply:

```
Hamloy news (what changed since you last looked):
- The human answered Q-is21 "Where should synced habits live?": Supabase
```

If you pick something else, the tasks it finished on the assumption open again, and the agents hear that they're to be redone for the real answer. See [questions](https://hamloy.com/questions).

## Write down what only you can do

The agent can't make an Apple Developer account or pay a fee. It adds a request with the exact steps, and makes the tasks that need it wait on it:

```
⏺ hamloy - Add an item (MCP)(kind: "request", title: "Create the Apple Developer account", …)
  ⎿ R-5t62@1 Create the Apple Developer account
          Only you can enrol and pay the yearly fee

⏺ hamloy - Add an item (MCP)(title: "Sign in with Apple", needs: ["R-5t62"])
  ⎿ B-k4k8@1 Sign in with Apple (waits on R-5t62)
```

Then it moves to the next ready task instead of stopping. When you come back, For you on the board shows what waits on you, and each request says what doing it lets go ahead. See [requests](https://hamloy.com/requests).

## A claim that holds, and lets go

The agent claims its task, so other agents leave it alone. The claim lasts while the session keeps working. If the session closes, its claims go at once. If it simply goes quiet for half an hour, its claims are let go then, and the others hear it:

```
- claude (session 739e75e8) let go of B-1nw7 "Sync habits between devices" (quiet
  for half an hour); it's free to claim
```

If that quiet session wakes up and calls again, it is told what it lost:

```
Hamloy news (what changed since you last looked):
- This session was quiet for half an hour, so what it had claimed was let go:
  B-1nw7. Claim again what you are still on.
```

Work is never stuck behind a claim nobody holds. See [claims](https://hamloy.com/claims).

## Back in after a restart

A restarted session of the same person and the same app is not a stranger. It sees its earlier claim, takes it back without force, and gets the messages that were sent to the session it replaces:

```
⏺ hamloy - Claim an item (MCP)(key: "B-k3f9")
  ⎿ B-k3f9@5 "Streak counter on the home screen" claimed by this session, taken over from your earlier session
    8a3c1f02, quiet since this one began
    Hamloy news (what changed since you last looked):
    - Message from codex (session 3f9a21c0, on feat/haptics) about B-k3f9: I'm
      changing HabitRow.swift for the haptic tap. Can you leave that file to me?
```

In one test a session was killed in the middle of a task. The next one in the same folder listed the project, saw the task "claimed by your earlier session", took it over and finished it. The plan, the notes under each task, and what is left all live in Hamloy, not in the chat that was lost.

## Check on it from anywhere

You don't need the terminal to know how a long run is going. The board shows Right now (each agent, its branch, its task), Recent changes, and what is done on a branch but not merged yet. It is a web page, so open your board on your phone. Beside the terminal, `hamloy panel` keeps the same lists drawn next to the agent, and Claude Code's status line counts what waits for you:

_You answer one of two questions on the board. Claude Code's status line goes from 2 for you to 1. The status line is opt-in, and Claude Code's alone._

## When the run is done

"Done" means the others have the work. A task ticked on a branch shows as "not merged into main yet" until it is, and a branch deleted without merging turns its task red. After a night of work you see which tasks are merged, which wait on a branch, and which were lost ([git](https://hamloy.com/docs/git)).

Works with Claude Code and Codex through [the program](https://hamloy.com/docs/the-program), and with any MCP client through one link. Free for one project ([pricing](https://hamloy.com/pricing)).
