Files
magpie/internal
yetone 673651e8dd agents: the Codex app left on the old list has a Restart that quits and reopens it
The owner (10-23): the Agents row said "quit it with ⌘Q and open it again"
and asked for a one-click restart. The app copy's line now has a Restart
beside it, like the daemon's. magpie asks the app to quit (osascript
"tell application <bundle> to quit", as ⌘Q does), waits up to 30s for
every process under the bundle to end, then opens it again. If the app
doesn't end in time (for example, it asks something in its window), that
is reported and the app is not opened a second time.

Only a bundle that StaleCopies lists as an app left on the old list is
quit. StaleCopy now carries the app's Bundle. POST /api/codex/app/reopen
refuses any other path. This is macOS only; elsewhere the route says so.

Run:
- go test ./internal/agent -run 'TestCodexAppReopen|TestCodexStale': ok.
  TestCodexAppReopen went red with the listed-bundle check broken by hand.
- go test ./internal/gui -run TestCodexDaemon: ok.
- GUI: agent-stale-copies + i18n-keys, chromium and webkit, en zh zh-TW
  ja de, 980 and 440px: 83 of 83 pass.
- Real osascript quit by bundle path and open, on a stand-in .app in the
  scratchpad: quit ended its process, and open started it again.
- gofmt -l clean; GOOS=linux go vet ./internal/agent and GOOS=windows
  go vet ./internal/agent ./internal/gui: ok.
Not tried: quitting the real Codex app (it is the owner's live one), and
the full suite.
2026-10-23 17:20:24 +08:00
..
…
…
…
…
…