The best way to control Claude Code, Codex and more from any computer or phone
[codex] migrate Effect.fn in apps/server/src/provider/Layers/ClaudeProvider.ts (#1634)
Co-authored-by: codex <codex@users.noreply.github.com>
Julius Marminge committed
Apr 1, 2026 at 08:57 UTC
67ca528fea4a90638811105929248fe565d0a27e
1 file changed
+9
-10
apps/server/src/provider/Layers/ClaudeProvider.ts
+9
-10
@@ -427,17 +427,16 @@ const probeClaudeCapabilities = (binaryPath: string) => {
427
);
428
};
429
430
-const runClaudeCommand = (args: ReadonlyArray<string>) =>
431
- Effect.gen(function* () {
432
- const claudeSettings = yield* Effect.service(ServerSettingsService).pipe(
433
- Effect.flatMap((service) => service.getSettings),
434
- Effect.map((settings) => settings.providers.claudeAgent),
435
- );
436
- const command = ChildProcess.make(claudeSettings.binaryPath, [...args], {
437
- shell: process.platform === "win32",
438
- });
439
- return yield* spawnAndCollect(claudeSettings.binaryPath, command);
430
+const runClaudeCommand = Effect.fn("runClaudeCommand")(function* (args: ReadonlyArray<string>) {
431
+ const claudeSettings = yield* Effect.service(ServerSettingsService).pipe(
432
+ Effect.flatMap((service) => service.getSettings),
433
+ Effect.map((settings) => settings.providers.claudeAgent),
434
+ );
435
+ const command = ChildProcess.make(claudeSettings.binaryPath, [...args], {
436
+ shell: process.platform === "win32",
437
});
438
+ return yield* spawnAndCollect(claudeSettings.binaryPath, command);
439
+});
440
441
export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(function* (
442
resolveSubscriptionType?: (binaryPath: string) => Effect.Effect<string | undefined>,