Task lifecycle: a long Task cannot run continuously — every Router message ends the Worker turn, and running vs idle is not observable

Aperta
#26 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
elixir, go

Direzione di ricerca

Start by reading the Task and Router lifecycle code and the tests for task creation and message handling; the issue does not name specific files or test paths. Trace what happens when a Router sends a message during a Worker turn, then determine how running, idle, and blocked states are represented. Done means a Task can make progress through a long run and the Router or UI can distinguish those states; the issue also describes capability, secret handling, and tool output concerns that may need separate scoping.

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

Descrizione

Environment

  • Version/build: unknown (not captured; Comma desktop on macOS)
  • Client surface: Comma desktop — Router plus one Task conversation
  • OS: macOS (arm64 host; Task placed on that host as a station)
  • Architecture: Router runs in Salix, Worker Task ran on a station
  • Error code: none
  • Frequency: every long Task in this session (1/1, ~45 min of work attempted)

Conditions and reproduction

Synthetic setup: a Router delegates a build-and-deploy task (edit code, run a self-test, deploy) to a Task on a station.

  1. Create a Task whose work needs roughly 10 sequential steps.
  2. The Worker completes 1–3 steps, then ends its turn with a progress note (“…ready, next I will…”).
  3. The Router sends a message to nudge it (“continue, do not report intermediate steps”).
  4. The Worker starts a new turn, does 1–3 more steps, and ends again.

Reproduction status: observed in a real session; not reproduced from scratch.

Expected result

One of:

  • the Router can tell a Task to keep running to completion without the Router's messages ending the Worker's turn, or
  • the Task has a durable run with checkpoints that resumes on its own, and
  • the Router/UI can tell “running”, “idle between turns” and “blocked” apart without inspecting the machine.

Actual result

  • Any Router message to a Task ends the current Worker turn. There is no “continue, don't reply” control: a nudge to speed it up actually interrupts it.
  • Between turns the Task still looks active while nothing executes. In this session the only reliable way to tell whether work was progressing was to read file mtimes on the station over SSH.
  • Net effect: roughly 40 minutes of work took several hours of wall-clock time and ended with the user cancelling the Task.

Additional observations from the same session

  1. Capability asymmetry. The Router had desktop automation (env.computer_use); the Task Worker did not, and task.create has no field to grant a capability to a Task. The Router had to perform the browser steps itself, part-executing work it had delegated.
  2. No channel for a user-supplied secret. Group-level secrets are handled through the OAuth/credential flow, but there is no supported path to hand a user-created third-party API key to a Task Worker on their own machine. A temporary file with chmod 600 was used ad hoc.
  3. Tool output size. env.computer_use returns the whole accessibility tree per observation (roughly 110k characters on a normal web page), which saturates context after one or two reads. A diff-only or element-query mode would make desktop automation practical.

Workaround

Unknown.

Lingua principale
Elixir
Stelle
740
Fork
61
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 AFK-surf/Comma

Tutte le issue di AFK-surf/Comma

Issue simili

Altre issue su Elixir

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.