MCPcopy Index your code
hub / github.com/codeaashu/claude-code / releaseComputerUseLock

Function releaseComputerUseLock

src/utils/computerUse/computerUseLock.ts:202–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200 * exit notifications on this. Idempotent: subsequent calls return `false`.
201 */
202export async function releaseComputerUseLock(): Promise<boolean> {
203 unregisterCleanup?.()
204 unregisterCleanup = undefined
205
206 const existing = await readLock()
207 if (!existing || existing.sessionId !== getSessionId()) return false
208 try {
209 await unlink(getLockPath())
210 logForDebugging('Released computer-use lock')
211 return true
212 } catch {
213 return false
214 }
215}
216

Callers 2

registerLockCleanupFunction · 0.85

Calls 5

getSessionIdFunction · 0.85
unlinkFunction · 0.85
logForDebuggingFunction · 0.85
readLockFunction · 0.70
getLockPathFunction · 0.70

Tested by

no test coverage detected