SIGN IN SIGN UP

fix(autopilots): show and keep Project for run_only autopilots (MUL-6681) (#7553)

The autopilot dialog rendered the Project section only in create_issue mode
and sent `project_id: null` for run_only on both create and update. A run_only
autopilot could therefore never be bound to a project from the web UI, and
editing anything else on one — a title, a cron expression — silently cleared a
binding made via the CLI, because the PATCH handler treats a present
`project_id: null` as "clear it".

That binding is not issue routing alone. A run_only task has no issue to
inherit project context from, so the daemon hydrates it from
`autopilot.project_id` (handler/daemon.go). Losing it drops the run out of the
project's repository / local_directory — and out of worktree isolation, where
the worktree is removed when the run ends — into a bare workdir that is only
reclaimed on the next GC sweep (2h by default).

Render the Project section and the detail-page field in both modes, persist
whatever is selected, and label what the field also controls. Subscribers stay
create_issue-only: they only affect issues the autopilot creates.

Reported in #7550.

Co-authored-by: J <bohan@devv.ai>
Co-authored-by: multica-agent <github@multica.ai>
B
Bohan Jiang committed
27610933e2114bf2a1a1c57300cc21a0271275ef
Parent: f8ec870
Committed by GitHub <noreply@github.com> on 8/25/2026, 5:14:51 PM