Skip to content

gateway: the macOS service runs with an app's priority - #5

Merged
teocns merged 1 commit into
mainfrom
gateway-interactive-priority
Nov 11, 2026
Merged

teocns merged 1 commit into
mainfrom
gateway-interactive-priority

Conversation

@teocns

@teocns teocns commented Nov 9, 2026

Copy link
Copy Markdown
Member

The launchd service file now sets ProcessType Interactive.

Why: every claude call waits on the gateway. Without a ProcessType, launchd may apply background limits. Under heavy memory pressure (swap at 14 GB, one 5.7 GB process), the gateway's page-ins queued behind other disk work and its health check timed out until the memory came back.

Changed

  • gateway/src/service-launchd.ts: the plist gets <key>ProcessType</key><string>Interactive</string>
  • gateway/test/service.test.ts: asserts the key
  • gateway/docs/operations.md: the macOS row says so

An installed service picks it up on its next service install; launchctl print gui/$UID/com.ak.gateway then shows spawn type = interactive.

Checks: npm run typecheck, npm run test:wire (182 pass), npm run test:engine (558 pass, 0 fail).

…s priority), so it keeps answering under memory pressure

Kit-Commit: 5dcea2fb936e069c92781ef7d8c8fa7bf09f52d7
Kit-Only: gateway
@teocns
teocns merged commit b516698 into main Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant