Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

(bug) A Daytona sandbox may stop in the middle of a turn that runs longer than 15 minutes

Aperta
#7,362 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Start by locating where the runner creates or reconnects Daytona sandboxes and applies the autostop and autodelete settings; the issue names the relevant environment variables but no source files or tests. Run the described long-command reproduction with the Daytona provider, watching sandbox state and runner logs. Done means confirming whether the sandbox stops mid-turn and recording the result, or making and verifying a change that keeps it available through the turn.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

backend bug report unconfirmed bug

🤖 The AI agent says:

When an agent runs a long command on the Daytona sandbox provider, I expect the sandbox to stay up until the turn ends. The Daytona SDK documentation says that a sandbox stops after 15 idle minutes, and that traffic through the sandbox preview URL does not count as activity. During a turn, all the traffic from the runner to the sandbox goes through the preview URL. So a turn that runs for more than 15 minutes may lose its sandbox in the middle of the turn.

This is not reproduced live yet. It comes from the SDK documentation text. The steps below are the test that confirms it or rules it out.

What the SDK documentation says

@daytonaio/sdk 0.198.0 (the version the runner pins), esm/Sandbox.d.ts, setAutostopInterval:

The Sandbox will automatically stop after being idle (no new events) for the specified interval.
Events include any state changes or interactions with the Sandbox through the sdk.
Interactions using Sandbox Previews are not included.

esm/Daytona.d.ts, the create parameters:

autoStopInterval - Auto-stop interval in minutes (0 means disabled). Default is 15 minutes ...
autoDeleteInterval - Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping). ...

Settings that matter for the test

  • The runner creates every sandbox with AGENTA_RUNNER_DAYTONA_AUTOSTOP_MINUTES (default 15) and AGENTA_RUNNER_DAYTONA_AUTODELETE_MINUTES (default 30).
  • The runner limits do not stop a long command first. One tool call may run for 30 minutes (AGENTA_RUNNER_TOOL_CALL_TIMEOUT_MS), and the idle limit is also 30 minutes (AGENTA_RUNNER_RUN_IDLE_TIMEOUT_MS).

Steps to reproduce

  1. Run a stack with the Daytona sandbox provider. Keep the default autostop. For a faster test, set AGENTA_RUNNER_DAYTONA_AUTOSTOP_MINUTES=2 on the runner and scale the times below to match.
  2. Create an agent with a harness that runs shell commands (Pi or Claude Code). Set the tool policy so the command runs without an approval, or approve it when the card shows.
  3. Send: Use your bash tool to run exactly: timeout 1200 tail -f /dev/null; echo done. This command runs for 20 minutes and prints nothing until the end. (Claude Code refuses a bare sleep 1200.)
  4. Watch the sandbox state in the Daytona dashboard and watch the runner log until the turn ends.

Expected: the sandbox stays started for the whole turn. After 20 minutes the command prints done and the turn ends normally.

Feared: about 15 minutes after the last SDK call (the create or the reconnect at the start of the turn), Daytona stops the sandbox. The command dies, the event stream from the sandbox drops, and the turn fails with a transport error. If nothing restarts the sandbox, Daytona deletes it 30 minutes later.

If the sandbox stays up, then Daytona counts preview traffic as activity in practice, and this issue can be closed with that note.

Where

  • Any deployment that uses the Daytona sandbox provider. Base: release/v0.122.1.
  • Found while doing research for the runner replicas design (#7322). Not seen in production or in QA, because no QA turn ran longer than a few minutes.
Lingua principale
TypeScript
Stelle
4.8k
Fork
690
Merge medio
23h 46m
PR unite (30g)
436

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Agenta-AI/agenta

Tutte le issue di Agenta-AI/agenta

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.