---
id: TASK-7.1
title: Implement zephyr binary discovery and run flow
status: Done
assignee:
  - codex
created_date: '2026-02-03 16:23'
updated_date: '2026-02-03 16:25'
labels: []
dependencies: []
parent_task_id: TASK-7
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Update `Manager.run` to locate the built zephyr simulator binary (e.g., `zephyr/zephyr.exe`) under the active build dir/image and execute it with extra args; fallback to `ninja run` without extra args when not found.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 `Manager.run` resolves the expected zephyr binary path for the active build dir/image.
- [x] #2 When the binary exists, `Manager.run` executes it directly with extra args appended.
- [x] #3 When the binary does not exist, `Manager.run` falls back to `ninja run` without extra args.
- [x] #4 Sysbuild image selection behavior remains intact.
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
1. Update Manager.run to compute the selected image/build dir, then look for zephyr/zephyr.exe.
2. If the binary exists, execute it directly and append extra args (global + profile + CLI `--`).
3. If the binary does not exist, fall back to `ninja run` without appending extra args.
4. Preserve current sysbuild image selection behavior and current-directory handling.
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Updated Manager.run to check for zephyr/zephyr.exe in the active build/image dir; runs it directly with run extra args when present, otherwise falls back to `ninja run` without extra args. No tests run for this subtask.
<!-- SECTION:NOTES:END -->
