Repository navigation
fix(box): login agents on a Mac run as interactive work, not background - #177
Merged
Merged
Conversation
launchd throttled the CPU and disk of a Background job and of everything it started, so agents and their builds on a Mac ran slow. The plist now says Interactive. berthd and the laptop agent update an older plist of their own in place when they start (the file only; launchd reads it at the next load), so a berthd upgraded from the app catches up and the byte-for-byte checks (doctor's "starts at boot", ensureAgent) keep passing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Every launchd plist Shipyard writes (
service.Render) saidProcessType Background. macOS throttles the CPU and disk of a Background job, and of everything it starts: the laptop agent,berthdon a Mac box, and the agents and buildsberthdruns in tmux. They now sayProcessType Interactive. Linux's systemd units are unchanged; they had nothing like it.Plists that are already installed
dev.berth.agent)berth agent restart --if-stalereinstalls it.dev.berth.berthd, app-managed)berthd install --keep-listenagain.berth upgradeberthdrewrites the line in its own plist (newservice.Migrate). launchd reads it at the next load (restart or login). Running the install command again applies it at once.Migratechanges only the file and never reloads a running service. It only touches a plist written for this same program andBERTH_HOME, so another install's plist, or a test's, is left alone. It matters beyond speed too:doctor's "starts at boot" andensureAgentcompare the plist byte for byte, so without it an older plist would read as "not installed".Proof
A real
berthdin an isolated HOME (a temporary~/Library/LaunchAgents, never the real one), with a plist as v0.3.29 writes it:(berthd then stopped binding its unix socket because the scratch path was over macOS's 104-byte limit. That happens after the migration and doesn't affect it.)
On this Mac, before the change, launchd reports the laptop agent as
spawn type = background (5).go vet ./...andgo test -race ./...pass, exceptinternal/box'sTestAttachPassesShiftEnter, which fails the same way on main with this Mac's tmux 3.7c. The docs build passes.🤖 Generated with Claude Code