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

Function registerLockCleanup

src/utils/computerUse/computerUseLock.ts:94–99  ·  view source on GitHub ↗

* Register a shutdown cleanup handler so the lock is released even if * turn-end cleanup is never reached (e.g. the user runs /exit while * a tool call is in progress).

()

Source from the content-addressed store, hash-verified

92 * a tool call is in progress).
93 */
94function registerLockCleanup(): void {
95 unregisterCleanup?.()
96 unregisterCleanup = registerCleanup(async () => {
97 await releaseComputerUseLock()
98 })
99}
100
101/**
102 * Check lock state without acquiring. Used for `request_access` /

Callers 1

Calls 2

registerCleanupFunction · 0.85
releaseComputerUseLockFunction · 0.85

Tested by

no test coverage detected