Bug reportCompleted

@terminal handoff fails with Swarm brief is required

Đạt TrầnPosted Shipped in 1.55.0

Bug Details

Location: Project > Orchestration > Agent Input > @terminal handoff

Mô tả:
Khi Codex giao việc cho CLI thông qua tính năng @terminal trong Orchestration, lệnh bị từ chối với lỗi ok: falseerror: "Swarm brief is required".

Trong log hiện tại, Codex đang đọc skill 1devtool-orchestrator và định sửa manifest theo schema, nhưng Orchestration/Swarm lại yêu cầu trường brief trong khi luồng đang dùng hoặc kỳ vọng sharedBrief. Điều này làm tác vụ bị ngắt với thông báo Conversation interrupted - tell the model what to do differently, người dùng phải tự report lỗi và không thể giao việc tiếp qua @terminal.

Lỗi xảy ra ở flow chọn terminal đích trong Agent Input, ví dụ chọn terminal max hãy truy xuất 1aivault..., cursor-agent, Hi, AK-CK, hoặc Cursor từ danh sách Terminals. Sau khi gửi, handoff không tạo được tác vụ hợp lệ cho CLI đích vì schema brief/sharedBrief không khớp.

Cần thống nhất schema giữa Orchestration skill, manifest được gửi và Swarm CLI backend. Nếu trường bắt buộc là brief thì UI/skill phải sinh đúng brief; nếu thiết kế mới dùng sharedBrief thì backend cần chấp nhận hoặc map sang brief.

Attachment:
Ảnh đính kèm gồm log lỗi Swarm brief is required sau khi Codex giao việc qua @terminal, và ảnh danh sách chọn terminal trong Agent Input/Orchestration.
image

Reproducibility: Always · Impact: Blocked

Environment

VERSION
unknown
OS
Windows
ARCH
x86_64
CHANNEL
stable

Resolution progress

SHIPPED · 1.55.0
  1. PENDING

  2. REVIEWING

  3. IN PROGRESS

  4. COMPLETED

  • Đạt Trần submitted this request
  • Khoa Nguyen moved it to In progress
  • Khoa Nguyen moved it to Completedfixed in 1.55.0

Discussion4

Newest first
  • Đạt Trần

    Nội dung gửi nhà phát triển 1DevTool
    Môi trường phát hiện lỗi:

    1DevTool: 1.53.0
    Cursor Agent: 2026.07.23-e383d2b
    Windows 11
    Dự án: D:\Projects\Monitoring\Home_Server
    1. Lỗi Terminal Link: đã có bản vá ứng viên
    Luồng bị lỗi:

    Codex → 1DevTool link send → Cursor CLI
    Hiện tượng:

    Liên kết hai chiều vẫn ở trạng thái active.
    Tiến trình Cursor vẫn hoạt động.
    Composer Cursor đang trống nhưng tin nhắn vẫn bị queued.
    Sau khoảng 10 phút, tin nhắn chuyển thành delivery-failed.
    Nguyên nhân:

    Cursor được 1DevTool nhận diện là một agent hợp lệ.
    Tuy nhiên agentReadiness.ts không có Cursor trong:
    AGENT_READY_MARKERS
    AGENT_CURSOR_COMPOSER_PREFIX
    Vì vậy hasKnownReadyMarker('cursor') luôn trả về false.
    waitForBackendAgentReady() trả về unsupported.
    LinkRegistry giữ tin nhắn trong hàng đợi cho tới khi hết thời gian.
    Bản vá thực hiện:

    Nhận diện hai trạng thái composer của Cursor:
    Plan, search, build anything
    Add a follow-up
    Nhận diện prompt prefix của Cursor là →.
    Giữ nguyên cơ chế kiểm tra ghost text/cell hiện tại.
    Không thêm timeout fallback hoặc cơ chế gửi cưỡng chế.
    Nếu Cursor đang có nội dung gõ dở, readiness vẫn trả về false.
    Kiểm thử:

    Trước sửa: regression test thất bại vì Cursor không phải readiness kind được hỗ trợ.
    Sau sửa: 5/5 test đạt.
    Bao phủ:
    Composer chào mừng đang trống.
    Composer follow-up đang trống.
    Từ chối gửi khi có nội dung trước cursor.
    Từ chối gửi khi có nội dung sau cursor.
    File gửi nhà phát triển:

    Source patch
    Gói ZIP
    Báo cáo kỹ thuật
    2. Lỗi Cursor Swarm headless: chưa được vá
    Luồng bị lỗi:

    Codex → 1DevTool Swarm headless → Cursor
    Lỗi nhận được:

    cursor cannot enforce the requested swarm sandbox
    Nguyên nhân đã xác định:

    AgentTeamController.runHeadlessUnit() yêu cầu sandbox cho mọi Swarm worker.
    sandboxFlags() hiện chỉ trả về sandbox flags cho:
    codex
    claude
    Với cursor, hàm trả về null, khiến worker thất bại trước khi prompt được gửi.
    Đường structured/ACP cũng đã thử nhưng thất bại:

    No safe structured runtime satisfies the requested capabilities
    Bản vá Terminal Link phía trên không tác động đến code path này.

    3. Công việc còn lại để hoàn chỉnh
    Áp dụng patch Terminal Link vào repository nguồn 1DevTool.

    Chạy test, typecheck, build và packaging chính thức.

    Cài bản build mới và kiểm tra end-to-end:

    Cursor trống phải nhận prompt và journal thành delivered.
    Cursor có nội dung gõ dở phải tiếp tục queued.
    Bổ sung hỗ trợ sandbox an toàn cho Cursor Swarm headless:

    Ánh xạ đúng flags sandbox của Cursor; hoặc
    Hoàn thiện Cursor structured/ACP harness.
    Thêm regression tests cho Cursor Swarm với sandbox read và write.

    Kiểm tra Swarm không sử dụng cờ bỏ qua approval/sandbox.

    Phát hành bản cập nhật 1DevTool và xác nhận cả Terminal Link lẫn Swarm hoạt động.

  • Đạt Trần

    Agent lúc đó đang ở chế chế độ Swarm

  • Đạt Trần

    Agent Input mode at failure time: Swarm
    Context:
    - App: 1DevTool v1.52.0
    - Project: HOME_SERVER (D:\Projects\Monitoring\Home_Server)
    - Host terminal: Codex (cd5cb762-74c8-4936-98a4-42594e52c011)
    - Flow: Codex delegated work via Orchestration > Agent Input > @terminal
    - Target terminal selected: "max hãy truy xuất 1aivault..." / cursor-agent (HOME_SERVER)
    - Orchestrator skill loaded: C:\Users\ACER\.codex\skills\1devtool-orchestrator\SKILL.md
    Command executed immediately before the error:
    $previousOutputEncoding = $OutputEncoding
    try {
    $OutputEncoding = [System.Text.UTF8Encoding]::new($false)
    $MANIFEST | & 'C:\Users\ACER\.1devtool\bin\1devtool-agent-v4.cmd' swarm start --manifest-stdin
    } finally {
    $OutputEncoding = $previousOutputEncoding
    }
    JSON manifest sent immediately before the error:
    {
    "clientRequestId": "05a0d13f-6725-4411-bd66-82684579596e",
    "sharedBrief": "Delegate the remaining Home Server work to cursor-agent (HOME_SERVER). Read 1AIVault context, continue the active plan at
    D:\\Projects\\Monitoring\\Home_Server\\plans\\260727-1151-home-server-mvp-implementation, and hand off implementation work to the linked
    cursor-agent terminal. Do not spawn independent ad-hoc agents.",
    "count": 1,
    "targets": ["cursor"],
    "poolSize": 1,
    "budget": 1,
    "substrate": "terminal"
    }
    Note:
    - This manifest was rejected before orchestration admission.
    - CLI expects field name brief, not sharedBrief.
    - Because validation failed at CLI level, this exact rejected manifest was not persisted into orchestration journal; it is reconstructed from the
    on-terminal failure output below.
    Full terminal output with error:
    {
    "ok": false,
    "error": "Swarm brief is required"
    }
    Codex diagnosis immediately after the error:
    - Lệnh Swarm bị từ chối vì CLI yêu cầu trường brief thay cho sharedBrief.
    - Theo hướng dẫn, sẽ đọc routing của orchestrator sau lỗi này, sửa manifest đúng schema rồi gửi lại.
    - Chưa tạo agent độc lập.
    Follow-up command run right after the error:
    Get-Content -LiteralPath 'C:\Users\ACER\.codex\skills\1devtool-orchestrator\SKILL.md' -Raw
    UI result:
    Conversation interrupted - tell the model what to do differently.
    Expected manifest shape per orchestrator skill:
    {
    "clientRequestId": "",
    "brief": "",
    "count": 8,
    "targets": ["codex"],
    "poolSize": 4,
    "budget": 8,
    "substrate": "headless",
    "sandbox": "read"
    }
    Related successful Swarm manifest from orchestration journal for the same HOME_SERVER host terminal
    (reason: swarm-start-intent; this one was accepted because it used brief):
    {
    "clientRequestId": "05a0d13f-6725-4411-bd66-82684579596e",
    "brief": "Project: Home Server\nEnvironment: Windows 11 (win32), PowerShell, CWD D:\\Projects\\Monitoring\\Home_Server, branch main, timezone
    Asia/Bangkok, date 2026-07-27. Memory snapshot at dispatch: 6MB/16088MB.\nTask: adversarially review the complete implementation plan at
    D:\\Projects\\Monitoring\\Home_Server\\plans\\260727-1151-home-server-mvp-implementation before any implementation...",
    "count": 4,
    "targets": ["codex"],
    "poolSize": 4,
    "budget": 8,
    "substrate": "headless",
    "sandbox": "read"
    }
    Conclusion:
    - Agent Input was in Swarm mode, not Team mode.
    - Root issue appears to be schema mismatch on @terminal handoff: manifest used sharedBrief (or otherwise omitted brief), while Swarm CLI
    validation requires brief.

    Trả lời ngắn: Agent Input lúc đó là Swarm.

    Lưu ý: manifest fail không được ghi vào orchestration journal vì CLI reject trước khi admit; block trên reconstruct từ output terminal + diagnosis
    Codex. Phần brief manifest thành công thì lấy trực tiếp từ journal (swarm-start-intent, line 32).

  • Khoa NguyenSTOICSOFT TEAM

    Cảm ơn bạn đã báo lỗi. Vui lòng bổ sung:

    1. Toàn bộ log có lỗi và JSON manifest ngay trước lỗi.
    2. Agent Input lúc đó đang ở chế độ Team hay Swarm.

    Bạn có thể copy/paste log trực tiếp vào bình luận.

Sign in to comment, vote and follow this request.

Sign in to reply