pub fn forward_tray_cmd(data_dir: &Path, dir_hash: &str, cmd: &str)Expand description
Forward a tray action to the host, retrying while the failure is
Transient.
The tray starts as soon as the single-instance pipe/socket is claimed —
before srv/host are spawned, and well before the host publishes
ipc-port-<hash>. So a user who clicks Quit (or Open) during startup hits
exactly the Transient case ForwardError already distinguishes: “the
instance is alive but not serving IPC yet”. Dropping that request meant a
startup-time Quit silently did nothing and the app carried on booting
(Codex P2 on PR #2996).
Retries only Transient. Fatal means the port file was readable but the
HTTP path failed — a hung or genuinely broken host, where retrying just
hides the problem, so it is logged once and dropped.
The budget covers a slow cold start (first-run Defender scan, CEF init) without leaving a click queued forever: a request the user made a minute ago is no longer one they want acted on.