The best way to control Claude Code, Codex and more from any computer or phone
| 1 | diff --git a/lib/Artifacts.js b/lib/Artifacts.js |
| 2 | index 648209c089f984dc45bd5eba0788130c9813a1d6..c66b5433427498ced6c91ee7c371ad8295f6205a 100644 |
| 3 | --- a/lib/Artifacts.js |
| 4 | +++ b/lib/Artifacts.js |
| 5 | @@ -81,8 +81,8 @@ export const cached = (id) => (eff) => Effect.gen(function* () { |
| 6 | return cached; |
| 7 | } |
| 8 | yield* artifacts.set(id, Deferred.await(deferred)); |
| 9 | - const result = yield* eff; |
| 10 | - yield* Deferred.succeed(deferred, result); |
| 11 | + // Settle waiters on failure too, or every later caller hangs. |
| 12 | + const result = yield* eff.pipe(Effect.onExit((exit) => Deferred.done(deferred, exit))); |
| 13 | yield* artifacts.set(id, result); |
| 14 | return result; |
| 15 | }); |