Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

fix(agent-awake): release macOS sleep assertions when Orca exits (#35649)

OrcaWin35124e4252de
diff --git a/src/main/macos-system-sleep-assertion.test.ts b/src/main/macos-system-sleep-assertion.test.ts
index de6544f2dd5..47d33f422c2 100644
--- a/src/main/macos-system-sleep-assertion.test.ts
+++ b/src/main/macos-system-sleep-assertion.test.ts
@@ -32,10 +32,14 @@ describe('MacosSystemSleepAssertion', () => {
assertion.start('status-change')
- expect(spawn).toHaveBeenCalledWith('/usr/bin/caffeinate', ['-i', '-s'], {
- stdio: 'ignore',
- windowsHide: true
- })
+ expect(spawn).toHaveBeenCalledWith(
+ '/usr/bin/caffeinate',
+ ['-i', '-s', '-w', String(process.pid)],
+ {
+ stdio: 'ignore',
+ windowsHide: true
+ }
+ )
})
it('is a no-op off macOS', () => {
diff --git a/src/main/macos-system-sleep-assertion.ts b/src/main/macos-system-sleep-assertion.ts
index 1612df813e2..36e5d521a8a 100644
--- a/src/main/macos-system-sleep-assertion.ts
+++ b/src/main/macos-system-sleep-assertion.ts
@@ -71,7 +71,7 @@ export class MacosSystemSleepAssertion {
let child: CaffeinateProcess
try {
- child = this.spawn('/usr/bin/caffeinate', ['-i', '-s'], {
+ child = this.spawn('/usr/bin/caffeinate', ['-i', '-s', '-w', String(process.pid)], {
stdio: 'ignore',
windowsHide: true
})