fix(device): honor project access when global access is off #17350
main fromrefs/pull/17350/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
coderabbitai[bot](GitHub profile, opens in a new tab) approved these changes
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/server/src/mcp/toolkits/device/handlers.ts line 167OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -164,3 +164,4 @@164164 threadId: scope.thread.threadId,165165 hostId: target.hostId,166166 deviceId: target.id,167+ agentAccessEnabled: true,apps/server/src/mcp/McpInvocationContext.ts lines 138 to 139OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -118,3 +124,16 @@118124 Effect.withSpan("mcp.requireCapability"),119125 );120126127+/** A granted device credential still needs the calling project's current consent. */128+export const requireCurrentThreadDeviceAccess = Effect.gen(function* () {129+ const scope = yield* requireThreadMcpCapability("device");130+ const threads = yield* ThreadManagement.ThreadManagementService;131+ const projects = yield* ProjectStore.ProjectStoreV2;132+ const settings = yield* ServerSettings.ServerSettingsService;133+ const allowed = yield* Effect.gen(function* () {134+ const thread = yield* threads.getThreadShell(scope.thread.threadId);135+ if (thread === null || thread.deletedAt !== null) return false;136+ const project = yield* projects.get(thread.projectId);137+ if (Option.isNone(project) || project.value.deletedAt !== null) return false;138+ return resolveProjectSettings(yield* settings.getSettings, thread.projectId).settings139+ .enableAgentDeviceAccess;
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
coderabbitai[bot](GitHub profile, opens in a new tab) requested changes
apps/server/src/device/DeviceAgentAccess.ts lines 93 to 157Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +59,21 @@59+ readonly authorize: (token: string) => Effect.Effect<Target, DeviceAgentAccessDenied>;60+ }61+>()("t3/device/DeviceAgentAccess") {}62+63+const make = Effect.gen(function* () {64+ const threads = yield* ProjectionStore.ProjectionStoreV2;65+ const crypto = yield* Crypto.Crypto;66+ const consentContext = yield* Effect.context<67+ ProjectStore.ProjectStoreV2 | ServerSettings.ServerSettingsService68+ >();69+ const credentials = new Map<string, Target>();70+ const allowed = (target: Target) =>71+ currentThreadDeviceAccess(threads.getThreadShell(target.threadId)).pipe(72+ Effect.provide(consentContext),73+ );74+ return DeviceAgentAccess.of({75+ issue: Effect.fn("DeviceAgentAccess.issue")(function* (target) {76+ if (!(yield* allowed(target))) return yield* new DeviceAgentAccessDenied({});77+ const token = yield* crypto.randomUUIDv4.pipe(Effect.orDie);78+ credentials.set(token, target);79+ return token;- apps/server/src/device/AgentDeviceProxy.ts lines 87 to 88OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -0,0 +68,21 @@68+ return HttpServerResponse.text("Forbidden", { status: 403 });69+ const devices = yield* DeviceService.DeviceService;70+ const ready = yield* devices.agentReadinessIfSupported(target.hostId, true);71+ if (!ready) return HttpServerResponse.text("Device agent is not running", { status: 503 });72+ const headers: Record<string, string> = {};73+ for (const [name, value] of Object.entries(request.headers)) {74+ if (!DROPPED_HEADERS.has(name) && value !== undefined) headers[name] = value;75+ }76+ headers.authorization = `Bearer ${ready.agentDevice.token}`;77+ headers["x-agent-device-token"] = ready.agentDevice.token;78+ let upstream = HttpClientRequest.make(request.method)(79+ `${ready.agentDevice.baseUrl.replace(/\/$/, "")}${path}${url.value.search}`,80+ ).pipe(HttpClientRequest.setHeaders(headers));81+ if (path === "/rpc") {82+ const rpc = yield* decodeRpcRequest(yield* request.json);83+ if (rpc.params.session !== target.session)84+ return HttpServerResponse.text("Forbidden", { status: 403 });85+ const flags = yield* decodeObject(rpc.params.flags ?? {});86+ if (87+ [flags.udid, flags.serial, flags.deviceId].some(88+ (id) => id !== undefined && id !== target.deviceId,apps/server/src/device/AgentDeviceProxy.ts line 126OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -0,0 +106,21 @@106+ return HttpServerResponse.text("Invalid upload descriptor", { status: 502 });107+ const proxyUrl = new URL(108+ `${DeviceAgentAccess.AGENT_DEVICE_ROUTE_PREFIX}${direct.pathname}`,109+ url.value.origin,110+ ).toString();111+ return yield* HttpServerResponse.json({112+ ...descriptor,113+ upload: {114+ url: proxyUrl,115+ headers: {116+ "content-type": descriptor.upload.headers["content-type"] ?? "application/octet-stream",117+ authorization: `Bearer ${token}`,118+ "x-agent-device-token": token,119+ },120+ },121+ });122+ }123+ return yield* HttpServerResponse.json(descriptor);124+ }125+ const responseHeaders: Record<string, string> = { "cache-control": "no-store" };126+ for (const name of ["content-type", "content-disposition", "range", "x-upload-offset"]) {
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
coderabbitai[bot](GitHub profile, opens in a new tab) requested changes
apps/server/src/device/AgentDeviceProxy.ts lines 79 to 97Resolvedby lastobelus(GitHub profile, opens in a new tab)@@ -0,0 +49,21 @@49+);50+const encodeUploadAttempt = Schema.encodeEffect(51+ Schema.fromJsonString(Schema.Tuple([Schema.String, Schema.String, Schema.String, Schema.String])),52+);53+const decodeUploadResult = Schema.decodeUnknownEffect(UploadResult);54+const decodeRpcRequest = Schema.decodeUnknownEffect(RpcRequest);55+const decodeObject = Schema.decodeUnknownEffect(JsonObject);56+const decodeUploadDescriptor = Schema.decodeUnknownEffect(UploadDescriptor);57+const DROPPED_HEADERS = new Set([58+ "host",59+ "connection",60+ "upgrade",61+ "cookie",62+ "authorization",63+ "x-agent-device-token",64+ "content-length",65+ "accept-encoding",66+ "origin",67+ "x-forwarded-host",68+ "x-forwarded-proto",69+]);- apps/server/src/device/DeviceService.ts line 1239Resolvedby lastobelus(GitHub profile, opens in a new tab)@@ -1008,4 +1020,18 @@1008- const configureAgent = (hostId: DeviceHostId, ready: DeviceHost.DeviceHostAgentReady) =>1020+ const access = yield* DeviceAgentAccess.DeviceAgentAccess;1021+ const server = yield* HttpServer.HttpServer;1022+ const configureAgent = (1023+ hostId: DeviceHostId,1024+ ready: DeviceHost.DeviceHostAgentReady,1025+ target: { threadId: ThreadId; deviceId: DeviceId; session: string },1026+ ) =>10091027 Effect.gen(function* () {1010- const file = yield* configPath(hostId);1011- yield* writeAgentDeviceConfig(file, ready.agentDevice);1028+ const address = server.address;1029+ if (typeof address === "string" || !("port" in address))1030+ return yield* new DeviceHostUnavailableError({1031+ hostId,1032+ reason: "Agent device access requires an HTTP listener.",1033+ });1034+ const origin = new URL(HttpServer.formatAddress(address));1035+ if (origin.hostname === "0.0.0.0") origin.hostname = "127.0.0.1";1036+ if (origin.hostname === "[::]") origin.hostname = "[::1]";1037+ const file = yield* agentDeviceConfigPath(config.stateDir, hostId, path, target).pipe(
coderabbitai[bot](GitHub profile, opens in a new tab) requested changes
apps/server/src/device/LocalDeviceHost.ts lines 586 to 599OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -582,4 +583,17 @@582- timeoutBehavior: "timedOutResult",583- })584- .pipe(Effect.ignore)585- : Effect.void;583+ ) {584+ const existing = yield* readDaemonFile().pipe(Effect.option);585+ if (existing._tag === "None") return;586+ if (agentTool === null) {587+ // A crash can leave the daemon running before this host has activated in memory.588+ // Use an existing installation only: revoking access must never install or start tools.589+ if (590+ !(yield* isAgentDeviceInstalled(config.baseDir).pipe(591+ Effect.provideService(FileSystem.FileSystem, fs),592+ Effect.provideService(Path.Path, path),593+ ))594+ )595+ return yield* new DeviceHost.DeviceHostError({596+ hostId,597+ step: "invalidating recovered agent access",598+ cause: new Error("The installed agent-device launcher is unavailable."),599+ });- apps/server/src/device/AgentDeviceProxy.ts lines 127 to 129OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -0,0 +109,21 @@109+ path === "/upload/preflight" || path === "/upload/finalize"110+ ? yield* decodeObject(yield* request.json)111+ : undefined;112+ if (rpc) {113+ // The CLI uses command RPCs. Other daemon methods can ignore flags and114+ // select a device independently, so they cannot use this scoped credential.115+ if (rpc.method !== "agent_device.command" && rpc.method !== "agent-device.command")116+ return HttpServerResponse.text("Forbidden", { status: 403 });117+ if (rpc.params.session !== target.session)118+ return HttpServerResponse.text("Forbidden", { status: 403 });119+ const meta = yield* decodeObject(rpc.params.meta ?? {});120+ if (meta.uploadedArtifactId !== undefined) {121+ if (typeof meta.uploadedArtifactId !== "string")122+ return HttpServerResponse.text("Bad Request", { status: 400 });123+ yield* access.authorize(token, { kind: "upload", id: meta.uploadedArtifactId });124+ }125+ const flags = yield* decodeObject(rpc.params.flags ?? {});126+ if (127+ [flags.udid, flags.serial, flags.deviceId].some(128+ (id) => id !== undefined && id !== target.deviceId,129+ ) ||
- apps/server/src/device/DeviceService.ts lines 1354 to 1356Resolvedby lastobelus(GitHub profile, opens in a new tab)@@ -1091,9 +1123,9 @@10911123 return removed;10921124 }),10931125 );1094- // Stop old writers before deleting config files or publishing replacements, without blocking healthy hosts.1126+ // Stop old writers before publishing replacements, without blocking healthy hosts.10951127 yield* Effect.forEach(10961128 removed,1097- ({ id, scope }) =>1129+ ({ scope }) =>10981130 Effect.gen(function* () {10991131 yield* Scope.close(scope, Exit.void);
- apps/server/src/device/AgentDeviceProxy.ts lines 133 to 134OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -0,0 +114,21 @@114+ let uploadBody =115+ path === "/upload/preflight" || path === "/upload/finalize"116+ ? yield* decodeObject(yield* request.json)117+ : undefined;118+ if (rpc) {119+ // The CLI uses command RPCs. Other daemon methods can ignore flags and120+ // select a device independently, so they cannot use this scoped credential.121+ if (rpc.method !== "agent_device.command" && rpc.method !== "agent-device.command")122+ return HttpServerResponse.text("Forbidden", { status: 403 });123+ if (rpc.params.session !== target.session)124+ return HttpServerResponse.text("Forbidden", { status: 403 });125+ const meta = yield* decodeObject(rpc.params.meta ?? {});126+ if (meta.uploadedArtifactId !== undefined) {127+ if (typeof meta.uploadedArtifactId !== "string")128+ return HttpServerResponse.text("Bad Request", { status: 400 });129+ yield* access.authorize(token, { kind: "upload", id: meta.uploadedArtifactId });130+ }131+ const flags = yield* decodeObject(rpc.params.flags ?? {});132+ if (133+ [flags.udid, flags.serial, flags.deviceId].some(134+ (id) => id !== undefined && id !== target.deviceId,
- apps/server/src/mcp/toolkits/device/handlers.ts lines 180 to 181OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -166,8 +163,19 @@166- deviceId: target.id,167- });163+ // Check consent and connectivity before booting, without issuing a credential yet.164+ if (!(yield* devices.agentReadinessIfSupported(target.hostId, true))) {165+ return yield* new DeviceHostUnavailableError({166+ hostId: target.hostId,167+ reason:168+ "Agent device access requires enabled device support, agent access, and an available simulator platform on this host.",169+ });170+ }168171 const session = yield* devices.open({169172 threadId: scope.thread.threadId,170173 hostId: target.hostId,171174 deviceId: target.id,172175 platform: target.platform,173176 });177+ // Android boot resolves an AVD name to the serial used by subsequent CLI commands.178+ const agentArgs = yield* devices.agentTarget({179+ threadId: scope.thread.threadId,180+ hostId: session.hostId,181+ deviceId: session.deviceId,
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:XL
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
- apps/server/src/device/DeviceService.ts line 800OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -780,3 +795,6 @@780795 ),781796 )782797 : postShutdown("/api/devices/shutdown", { platform, id: deviceId });798+ // Android can reuse an emulator serial for another AVD after shutdown.799+ // Retire every thread targeting this slot before exposing it as available.800+ yield* retireDeviceAgentAccess(ready.hostId, deviceId);
- apps/server/src/device/DeviceService.ts line 942Resolvedby lastobelus(GitHub profile, opens in a new tab)@@ -778,2 +782,20 @@782+ // `simctl shutdown`; the hub's generic shutdown can leave that session cached783+ // across a reboot. serve-sim runs simctl bare, though, so a simulator that is784+ // already off fails there. Accept that failure only when the hub confirms785+ // the simulator is off; a failure on a running one still surfaces.786+ yield* platform === "ios"787+ ? postShutdown(`${vendorPrefix("ios")}/grid/api/shutdown`, { udid: deviceId }).pipe(788+ Effect.catch((cause) =>789+ fetchDevices(ready).pipe(790+ Effect.flatMap(({ devices }) =>791+ devices.find((device) => device.id === deviceId)?.booted === false792+ ? Effect.logInfo("iOS simulator was already shut down", { deviceId })793+ : Effect.fail(cause),794+ ),795+ ),778796 ),779- ),797+ )798+ : postShutdown("/api/devices/shutdown", { platform, id: deviceId });799+ // Android can reuse an emulator serial for another AVD after shutdown.800+ // Retire every thread targeting this slot before exposing it as available.801+ yield* retireDeviceAgentAccess(ready.hostId, deviceId);
- apps/server/src/mcp/toolkits/device/handlers.ts line 172OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -159,10 +161,12 @@159161 });160162 }161163 const target = yield* pickDevice(state.devices, input);162- // Resolve consent and agent connectivity before booting or registering a session.163- const agentArgs = yield* devices.agentTarget({164- threadId: scope.thread.threadId,165- hostId: target.hostId,166- deviceId: target.id,167- });164+ // Check consent and connectivity before booting, without issuing a credential yet.165+ if (!(yield* devices.agentReadinessIfSupported(target.hostId, true))) {166+ return yield* new DeviceHostUnavailableError({167+ hostId: target.hostId,168+ reason:169+ "Agent device access requires enabled device support, agent access, and an available simulator platform on this host.",170+ });171+ }168172 const session = yield* devices.open({apps/server/src/device/DeviceService.ts lines 690 to 696Resolvedby lastobelus(GitHub profile, opens in a new tab)@@ -553,6 +569,4 @@553569 );554570 if (!nextEnabled) {555571 yield* Effect.forEach(hosts.values(), (host) => host.stop, { discard: true });556- } else if (input.agentAccessEnabled === false) {557- yield* Effect.forEach(hosts.values(), (host) => host.stopAgent, { discard: true });558572 }
- apps/server/src/device/DeviceService.ts lines 467 to 469OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -426,11 +449,21 @@426449 return { devices, detail: list.errors?.map((error) => error.message).join("\n") || undefined };427450 });428451452+ let refreshVersion = 0;453+ const appliedRefreshVersions = new Map<DeviceHostId, number>();429454 const refresh = Effect.fn("DeviceService.refresh")(function* (ready: DeviceReadiness) {455+ const version = ++refreshVersion;430456 const host = hosts.get(ready.hostId);431457 const { devices, detail } = yield* fetchDevices(ready);432458 const hostSummaries = yield* Effect.forEach(hosts.values(), (host) => host.summary);433459 return yield* lifecycleLock.withPermit(434460 Effect.gen(function* () {435461 if (!(yield* readDeviceSettings).enabled || !host || hosts.get(ready.hostId) !== host)436462 return (yield* SynchronizedRef.get(stateRef)).state;463+ const { state } = yield* SynchronizedRef.get(stateRef);464+ // A slow older discovery must not retire a runtime a newer open observed.465+ if (version < (appliedRefreshVersions.get(ready.hostId) ?? 0)) return state;466+ appliedRefreshVersions.set(ready.hostId, version);467+ const retired = state.devices.filter((previous) => {468+ if (previous.hostId !== ready.hostId || !previous.booted) return false;469+ const current = devices.find((device) => device.id === previous.id);apps/server/src/device/DeviceService.ts lines 1119 to 1123Resolvedby lastobelus(GitHub profile, opens in a new tab)@@ -925,3 +977,14 @@925977 reason: "Agent CLI installation is unavailable in this device service.",926978 }),927979 ),980+ refreshAgentDevice: (ready) => refresh(ready).pipe(Effect.asVoid),981+ abortOpen: (openedSession) =>982+ lifecycleLock.withPermit(983+ Effect.gen(function* () {984+ const { state } = yield* SynchronizedRef.get(stateRef);985+ if (!state.sessions.includes(openedSession)) return;986+ yield* retireThreadDeviceAgentAccess(987+ openedSession.threadId,988+ openedSession.hostId,989+ openedSession.deviceId,990+ );
- apps/server/src/device/AgentDeviceProxy.ts line 217OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -0,0 +197,21 @@197+ yield* access.authorize(token, { kind: "upload", id: uploadBody.uploadId });198+ } else {199+ if (typeof uploadBody.uploadAttemptId !== "string")200+ return HttpServerResponse.text("Bad Request", { status: 400 });201+ // The daemon deduplicates by uploadAttemptId and file metadata, without a session.202+ uploadBody = {203+ ...uploadBody,204+ uploadAttemptId: yield* encodeUploadAttempt([205+ target.threadId,206+ target.hostId,207+ target.session,208+ uploadBody.uploadAttemptId,209+ ]),210+ };211+ }212+ }213+ const devices = yield* DeviceService.DeviceService;214+ const ready = yield* devices.agentReadinessIfSupported(target.hostId, true);215+ if (!ready) return HttpServerResponse.text("Device agent is not running", { status: 503 });216+ // Commands must observe external shutdown/replacement before using a retained credential.217+ if (rpc) yield* devices.refreshAgentDevice(ready);apps/server/src/device/DeviceService.ts lines 592 to 594OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -524,3 +580,15 @@524580 },525581 );526582583+ const stopUnusedAgents = Effect.gen(function* () {584+ const current = yield* settings.getSettings.pipe(585+ Effect.mapError(586+ (cause) =>587+ new DeviceOperationError({ operation: "settings", reason: "settings_failed", cause }),588+ ),589+ );590+ if (591+ current.enableAgentDeviceAccess ||592+ Object.values(current.projectSettingsOverrides).some(593+ (override) => override.enableAgentDeviceAccess === true,594+ )
- apps/server/src/device/AgentDeviceProxy.ts line 219OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -0,0 +199,21 @@199+ if (typeof uploadBody.uploadAttemptId !== "string")200+ return HttpServerResponse.text("Bad Request", { status: 400 });201+ // The daemon deduplicates by uploadAttemptId and file metadata, without a session.202+ uploadBody = {203+ ...uploadBody,204+ uploadAttemptId: yield* encodeUploadAttempt([205+ target.threadId,206+ target.hostId,207+ target.session,208+ uploadBody.uploadAttemptId,209+ ]),210+ };211+ }212+ }213+ const devices = yield* DeviceService.DeviceService;214+ const ready = yield* devices.agentReadinessIfSupported(target.hostId, true);215+ if (!ready) return HttpServerResponse.text("Device agent is not running", { status: 503 });216+ // Commands must observe external shutdown/replacement before using a retained credential.217+ if (rpc) yield* devices.refreshAgentDevice(ready);218+ // Readiness may wait while this host is replaced or thread consent is revoked.219+ yield* access.authorize(token);
- apps/server/src/device/DeviceService.ts line 478OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -432,18 +471,8 @@432471 const hostSummaries = yield* Effect.forEach(hosts.values(), (host) => host.summary);433472 return yield* lifecycleLock.withPermit(434473 Effect.gen(function* () {435474 if (!(yield* readDeviceSettings).enabled || !host || hosts.get(ready.hostId) !== host)436475 return (yield* SynchronizedRef.get(stateRef)).state;437- return yield* publish((state) => ({438- ...state,439- hosts: hostSummaries,440- ...(ready.hostId === LOCAL_DEVICE_HOST_ID ? { hostStatusDetail: detail } : {}),441- devices: [442- ...state.devices.filter((device) => device.hostId !== ready.hostId),443- ...devices,444- ],445- hostStatuses: {446- ...state.hostStatuses,447- [ready.hostId]: { status: "ready", ...(detail ? { detail } : {}) },448- },449- }));476+ const { state } = yield* SynchronizedRef.get(stateRef);477+ // A slow older discovery must not retire a runtime a newer open observed.478+ if (version < (appliedRefreshVersions.get(ready.hostId) ?? 0)) return state;apps/server/src/device/DeviceAgentAccess.ts lines 178 to 180Resolvedby lastobelus(GitHub profile, opens in a new tab)@@ -0,0 +160,21 @@160+ const target = credentials.get(token);161+ if (!target) return yield* new DeviceAgentAccessDenied({});162+ if (!(yield* allowed(target))) {163+ discard(target);164+ return yield* new DeviceAgentAccessDenied({});165+ }166+ if (resource !== undefined && !owns(target, resource))167+ return yield* new DeviceAgentAccessDenied({});168+ return target;169+ }, credentialLock.withPermit),170+ ownsResource: (target, resource) => Effect.sync(() => owns(target, resource)),171+ recordResource: (target, resource) =>172+ Effect.gen(function* () {173+ const token = slots.get(targetKey(target));174+ if (token === undefined || credentials.get(token) !== target)175+ return yield* new DeviceAgentAccessDenied({});176+ const now = expireResources();177+ const key = resourceKey(target, resource);178+ const previous = resources.get(key);179+ if (previous !== undefined && previous.owner !== owner(target))180+ return yield* new DeviceAgentAccessDenied({});
- apps/server/src/device/LocalDeviceHost.ts lines 585 to 586OutdatedResolvedby lastobelus(GitHub profile, opens in a new tab)@@ -568,18 +584,3 @@568- ) =>569- agentTool570- ? runner571- .run({572- command: agentTool.nodePath,573- args: [574- agentTool.entryPath,575- "daemon",576- "stop",577- "--state-dir",578- agentDeviceStateDir(path, config.stateDir),579- ],580- env: { ...hostEnvironment, AGENT_DEVICE_NO_UPDATE_NOTIFIER: "1" },581- timeout: Duration.seconds(10),582- timeoutBehavior: "timedOutResult",583- })584- .pipe(Effect.ignore)585- : Effect.void;584+ ) {585+ const existing = yield* readDaemonFile().pipe(Effect.option);586+ if (existing._tag === "None") return;
Sign in to join this conversation.
Codex Review Summary#
This comment shows the latest Codex review activity on this pull request.
c7dac9fℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.