fix(aterm): quit kitty with its last window, so a bundle reopen starts a session #1340
No reviewers
Labels
No labels
burndown-2026-06
burndown-2026-08
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agentic-os!1340
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/mt75"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closing an aterm app and reopening it never restarted the console process. Reported by Kai in session.
Why
kitty stays running with no windows open on macOS. That is the platform's own convention and kitty's
macos_quit_when_last_window_closeddefaults tono, confirmed against the installed 0.48.2 and its shipped docs ("kitty will stay running, even with no open windows").The instance that survives a closed window is the bundle's own linked binary, which is exactly what makes the Dock, the switcher, and Mission Control read the role. So LaunchServices keeps the .app registered as running, and the next click activates an empty app instead of executing the wrapper. No new session, no new console process.
The fix
aterm/plan.gopasses-o macos_quit_when_last_window_closed=yes, so closing the window ends the instance that drew it and the next click launches fresh.Verification
plan.goand passes with it.parse_configresolves it toTrue, and an invented key is rejected as an unknown config key. A--versionsmoke test was tried first and discarded, since it short-circuits before option parsing and passed for the bogus key too.just aterm-test,just aterm-lint,just aterm-contract(live roster), andpre-commit run --all-filesall green.Rollout
Every window option comes from the binary rather than the wrapper, so this lands on a rebuilt
atermwith noaterm bundlesregeneration. Kai's installed/opt/homebrew/bin/atermneeds the new build before a click behaves.Docs
docs/aterm.mdwas at its 8000-char cap anddocs/*.mdis at the 40-file count cap, so the new prose displaced retold justification rather than extending the file. It also drops the claim that each click opens a new session: macOS launches nothing for an app it already runs, so that only holds with no window open. The file now sits at 7994 of 8000, which is filed as a follow-up.