crew (omp): approvals time out after 30 s, an answered choose card stays live and drops the next answer, and a parked crewmate shows "working"

オープン
#524 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
linux, rust, typescript
領域
api, backend, desktop

調査の方向性

This issue groups three bugs across crates/atlas-host/src/crew/engine/omp.rs, crates/atlas-host/src/crew/runner/conversation.rs, crates/atlas-host/src/crew/handlers/tasks.rs, crates/atlas-host/src/crew/hub.rs, and apps/desktop/src/lib/crew/chat/TaskActionCard.svelte. Start by tracing each reported flow and its existing tests, including omp-approval.test.ts; done means the approval wait survives OMP's handler timeout, accepted task answers update and broadcast state while duplicate answers return an error, and every waiting_action task reports needs_you.

索引モデルが issue の本文から書いたものです。

説明

status: needs-triage type: bug

Seen on atlas 1.5.0-alpha.26 (alpha channel) with Atlas Desktop on Linux (Omarchy, kernel 7.2.15), talking to a crew server on Ubuntu 24.04.5 running hostd 1.5.0-alpha.24 (the server atlas version). Engine: omp 18.21.0 (/usr/local/lib/atlas-crew/engine-home/.local/bin/omp). Five crewmates, all engine: omp, max_agents: 2. Code references are to main at 61e6648d.

Three problems hit together in one evening and left the crew stuck; they are separate, but each made the next one worse. I can split them into three issues if you prefer.

1. With omp, approval: ask blocks every tool after 30 s, even when someone approves

What happened

A GitHub trigger (pr_opened, no allow_auto) started the Revisor crewmate. Every tool call was refused with no approval received. After I answered its card with "ok", the calls kept failing with:

Extension /var/lib/atlas-cm/<crewmate>/crew-runtime/omp-approval.ts timed out after 30000ms

The agent then asked me, through an input card, to "release the tools" ("Liberar ferramentas"), which nothing in the UI can do:

Revisor: every tool refused, the agent asks the owner to release tools

audit.jsonl of that crewmate shows approvals asked about 34 s apart: one answered within 10 s (allow, by: desktop), the next four never decided:

1794872002 approval_asked     bash
1794872012 approval_decision  bash allow desktop
1794872017 approval_asked     bash
1794872051 approval_asked     bash
1794872085 approval_asked     bash
1794872117 approval_asked     read
Why

The generated extension waits up to 30 minutes (omp.rs#L309, AbortSignal.timeout(1_800_000)), and the CHANGELOG says crewmate approval prompts wait 30 minutes. But omp runs each tool_call extension handler under its own limit, the setting extensionHandlers.toolCallTimeoutMs, default 30000. Its description in omp 18.21: "Positive finite active-work timeout for extension tool_call handlers; invalid values use 30000ms, and time awaiting OMP-owned dialogs does not count". The extension's fetch to /hook/omp/decision is not an OMP-owned dialog, so omp abandons the handler at 30 s and blocks the tool. An approval answered after that is accepted by hostd but goes nowhere.

The crew overlay that hostd passes with --config only sets power.sleepPrevention (omp.rs#L26).

Expected

The overlay also raises the omp limit above the extension's own wait, for example:

power:
  sleepPrevention: "off"
extensionHandlers:
  toolCallTimeoutMs: 1805000

(1 805 s, matching the PermissionRequest timeout used for Claude Code.) omp-approval.test.ts tests the extension with a local stub and so never meets omp's limit; a test that runs the real omp would catch it.

Workaround

allow_auto: true on the GitHub triggers (only for owner/member/collaborator authors), so those tasks never ask.

2. A choose card cannot be answered: after the first answer it stays clickable and clicks do nothing

What happened

The Gerente crewmate parked a task on a choose action with three options. In the Desktop the card stayed on screen with all three options, and the owner could not answer it: clicking an option gave no feedback and the card did not change. The header still showed Working · 1m:

Gerente: choose card still shown while the header says Working

On the server the task had already been answered once: tasks.jsonl stores answer: "Adicionar healthcheck aos dois" (option A), and the agent continued on that answer. The owner wanted option B. I then sent option B through the hostd socket (crewmate_action_answer with id, task, value): the reply was {"ok": true}, nothing happened, and the stored answer stayed A.

Why

After an answer, answer_action_turn (conversation.rs#L257-L283) sets task.answer and runs the follow-up turn, but neither sets the task back to running nor stores or broadcasts it. So while the agent works on the answer, the store and every client still see waiting_action with the choose action, and the Desktop keeps rendering the live card (TaskActionCard.svelte#L96-L107).

A second click then reaches action_answer (tasks.rs#L262-L266). There is no waiter for that task anymore, so hub.crew.answer_action returns false (hub.rs#L240-L247), but the handler ignores that and returns {}. The client gets success for an answer that was dropped.

I could not tell from the logs who sent answer A; the Desktop was the only client connected.

Expected
  • Once an answer is accepted, the task goes back to running (stored and broadcast), and the chat shows the picked option instead of a live card.
  • crewmate_action_answer fails when nobody is waiting for the answer (answer_action returned false), for example "this task already got an answer", and the Desktop shows that error.

3. A crewmate parked on a card shows "working…" instead of "needs you"

What happened

In the first screenshot the sidebar shows Gerente — working… with the green dot. At that moment its only active task (16fb8f33) was waiting_action with a refused action (the task wrote a scratch file under /tmp, outside the work tree), and the rest of its queue was queued. crewmate_list returned state: "working" for the crewmate. Nothing told the owner that the Gerente was waiting for him, so its queue stayed stuck until the card timed out (task_finished, state: failed, error: "timed out waiting for action response").

The Revisor in the same screenshot, parked on its input card, does show Needs you, so the crewmate state seems to depend on the action kind or on how the task was parked: refused (and, per problem 2, a choose that was already answered) leaves the crewmate in working.

Expected

Any task in waiting_action makes its crewmate needs_you, whatever the action kind.

Steps to reproduce

Expected to reproduce from the code above; not run step by step on a clean server.

# crew server with omp as engine, a crewmate with approval: ask
# 1. Give the crewmate a task that runs a shell command; approve it in the Desktop more than 30 s after it is asked.
#    -> the tool is blocked: "omp-approval.ts timed out after 30000ms"
# 2. Ask the crewmate something that makes it park on a choose card; click one option, then another.
#    -> the card stays, the second click returns ok and is dropped
# 3. Make a task write a file under /tmp so it ends refused.
#    -> the sidebar shows the crewmate as "working…", not "needs you"

Relevant logs

From the crewmate's audit.jsonl (Gerente, task 00dcc429):

1794872221 task_started   source=desktop
1794872399 task_refused   reasons: a command wrote a file outside the work tree: /tmp/gerente/b14.md, ...
1794872477 task_finished  state=cancelled   (cancelled by me through crewmate_cancel to free the queue)

hostd journal around the same minutes only has atlas crew: summary: omp took over 25s, sending the full reply.

主要言語
Rust
スター
3
フォーク
1
平均マージ
9時間 51分
マージ済み PR(30日)
310

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeatlasdev/atlas のほかの issue

codeatlasdev/atlas の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。