Repository navigation
Effect Service Conventions: 4 issues found
The merge at this head consumes an AcpSessionRuntime service shape that no longer exists. 75ffa4f parked apps/server/src/provider/acp/AcpSessionRuntime.ts at upstream state and the follow-up merge 39ca2a5 never re-applied the ACP runtime changes, so the new driver and the generalized adapter call members and options that are absent from the service's public shape.
Findings (all posted inline):
apps/server/src/provider/Drivers/AcpDriver.ts:172—runtime.connect()is not onAcpSessionRuntime["Service"]; the interface exposesinitialize()andstart()only.apps/server/src/provider/Drivers/AcpDriver.ts:92—AcpSessionRuntime.makerequiresauthMethodId, whichAcpAdapterProfile["makeRuntime"]omits and nothing re-supplies (same omission in the newmakeTestAcpAdapterhelper inLayers/CursorAdapter.test.ts).apps/server/src/provider/Layers/CursorAdapter.ts:516—ctx.acp.closeis not a member of the runtime service; teardown is already owned byScope.close(ctx.scope, ...).apps/server/src/provider/Layers/CursorAdapter.ts:583—onConfigOptionsChangedis not inAcpSessionRuntimeOptionsand is silently dropped through a conditional spread, so ACP model discovery/refresh never fires.
The earlier finding on acp/AcpSessionRuntime.ts:577 (Effect.cached memoizing a failed handshake) is no longer applicable — that file is unchanged at this head. The earlier finding on acp/AcpAdapterSupport.ts:45 (untyped provider === "acp" plus magic -32000, remediation text concatenated onto the agent-supplied wire message) is unchanged and was not re-posted.
Details
Note
Your check run agent prompt is: .macroscope/check-run-agents/effect-service-conventions.md
More information about how Check Run Agents work can be found in our Help Center.
Methodology: compared the merge base 70cd258 with head 39ca2a5, then read the current contents of apps/server/src/provider/acp/AcpSessionRuntime.ts, apps/server/src/provider/acp/CursorAcpSupport.ts, apps/server/src/provider/Drivers/AcpDriver.ts, and apps/server/src/provider/Layers/CursorAdapter.ts at head to verify the service interface and options actually available to the new consumers.
Evidence at head 39ca2a5:
AcpSessionRuntimeContext.Serviceinterface members includeinitialize,start,getEvents,drainEvents,getModeState,getConfigOptions,prompt,cancel,setMode,setConfigOption,setModel,setSessionModel,request,notify— noconnect, noclose.AcpSessionRuntimeOptionsfields:spawn,cwd,resumeSessionId,sessionLoadTimeout,sessionLoadReplayIdleGap,clientCapabilities,clientInfo,authMethodId(required),mcpServers,requestLogger,protocolLogging— noonConfigOptionsChanged.make(options: AcpSessionRuntimeOptions)andlayer(options: AcpSessionRuntimeOptions)both take the full options object;makeCursorAcpRuntimesuppliesauthMethodId: "cursor_login"internally, which is why the Cursor path is unaffected.
Items reviewed and not flagged: namespace import style in the new modules (* as Effect, * as AcpSessionRuntime, named imports from @t3tools/contracts) matches the conventions; makeUnsupportedTextGeneration returns via TextGeneration.of with the existing TextGenerationError operation discriminator, consistent with the surrounding module; selectAcpPermissionOptionId replaces the previous string-mapping helper without introducing a redundant wrapper.
🔍 Agent activity — 15 tool calls
💭 I'm comparing the current PR head against the prior reviewed commit to see what changed. The diff I'm seeing now seems smaller than expected—AcpSessionRuntime.ts doesn't appear in it, even though it was commented on in the prior run, so the diff scope might have shifted.
1. git_tools — 70cd258..39ca2a5
2. git_tools — 70cd258..39ca2a5
💭 Since AcpSessionRuntime.ts was reverted back to upstream state, my earlier comment about the Effect.cached concern on line 577 no longer applies — that file isn't part of the diff anymore. I should mark that thread as outdated and minimize it. My other finding about AcpAdapterSupport.ts:45 with the provider check and error code concatenation is still unchanged, so no need to repeat it. What concerns me now is whether reverting the runtime file broke compilation — things like runtime.connect(), close(), getConfigOptions, onConfigOptionsChanged, and AcpSessionRuntime.make with clientCapabilities may no longer exist if the file reverted to an older interface. I need to check the actual head state of AcpSessionRuntime.ts to confirm whether this is a real compile issue.
3. git_tools — 75ffa4f
4. git_tools — connect|getConfigOptions|onConfigOptionsChanged|Effect.cached|close
💭 I'm checking whether the merge commit actually re-applied the ACP runtime changes, but the grep at head shows
connectis still missing from AcpSessionRuntime.ts — meaning the head branch is broken since AcpDriver still callsruntime.connect()and CursorAdapter callsctx.acp.close. This seems out of scope for my check, which is focused on Effect service conventions rather than integration breaks, but it's still worth verifying: I need to confirm whetherAcpSessionRuntimeOptionsactually includesonConfigOptionsChangedand whether the service exposesstartinstead ofconnect, since passing a nonexistent field would be a compile error.
5. browse_code — apps/server/src/provider/acp/AcpSessionRuntime.ts
💭 I've confirmed the runtime only exposes
initializeandstartat head, with noconnectorclosemethods. Now I want to check whetherAcpSessionRuntimeOptionsincludesonConfigOptionsChangedandclientCapabilities.
6. browse_code — apps/server/src/provider/acp/AcpSessionRuntime.ts
💭 I'm confirming that the head branch's runtime options type is broken: it lacks
onConfigOptionsChanged,connect, andclose, and requiresauthMethodIdeven though the driver'smakeRuntimenever supplies it, which means the call toAcpSessionRuntime.makewould fail type-checking. I'm also checking whetherCursorAdapter.tscallingctx.acp.closeand passingonConfigOptionsChangedeven compiles given the mismatched type, and whethercollectSessionConfigOptionValuesactually exists inAcpRuntimeModelat head — this looks like a genuine broken service contract between the driver/adapter and the runtime, not just a style nit, so it's worth flagging even though the review scope is nominally about conventions. I'll report this violation. Now I want to verify each claim precisely, starting with whether AcpRuntimeModel at head actually exports collectSessionConfigOptionValues.
7. git_tools — collectSessionConfigOptionValues|makeCursorAcpRuntime
8. git_tools — acp.close|runtime.connect|onConfigOptionsChanged
💭 Confirmed - consumers reference methods that don't exist on the parked runtime interface at head, and both AcpDriver and the CursorAdapter test call
AcpSessionRuntime.makewithout the now-requiredauthMethodId. I want to check themakeCursorAcpRuntimesignature to confirm it doesn't accept the config options callback either.
9. browse_code — apps/server/src/provider/acp/CursorAcpSupport.ts
💭 I'm checking whether adding an
onConfigOptionsChangedproperty to the input object would trigger an excess property error, since the runtime's input type likely omits certain fields and I need to verify how the spread would type-check. Actually, since TypeScript's excess property checks don't apply to spread expressions, the property probably wouldn't error at compile time — it would just be silently dropped, meaning the callback never gets passed to the runtime and ACP model discovery would silently fail to work. Meanwhileruntime.connect()andctx.acp.closereferencing nonexistent Service properties are clear compile errors. I also need to check whetherAcpSessionRuntime.makerequiresauthMethodIdand whethermakeeven exists as an exported function at head.
10. git_tools — ^export const (make|layer)|^export const make
💭 I'm confirming the type error:
makeRuntimeand its test helper both omitauthMethodIdwhen constructing the runtime options, which breaks sinceAcpSessionRuntimeOptionsrequires it. This looks like one of three integration breaks caused by the "park runtime at upstream state" commit not being followed up properly. This falls within my review scope—consuming members not on the service's public shape violates the service-boundary convention, so I'll flag it as a single finding across the affected call sites. I need to pin down exact line numbers:runtime.connect()in AcpDriver.ts (around line 172), andctx.acp.closein CursorAdapter.ts (around lines 516 and 582-583), so I'm checking the actual files to confirm placement before leaving inline comments.
11. browse_code — apps/server/src/provider/Drivers/AcpDriver.ts
12. browse_code — apps/server/src/provider/Drivers/AcpDriver.ts
💭 I need to double-check specific line ranges in CursorAdapter to verify those sections.
13. browse_code — apps/server/src/provider/Layers/CursorAdapter.ts
💭 All confirmed, so now I can write up the findings. The first issue is in AcpDriver.ts around lines 172 and 92: it calls a
connect()method that doesn't actually exist on theAcpSessionRuntimeservice's current interface (which only exposesinitialize()andstart()), and also passes amakecall requiringauthMethodIdthat gets stripped by anOmittype and never re-supplied. This looks like it was introduced by a merge conflict. The second issue is in CursorAdapter.ts:516, wherectx.acp.closeis called but isn't part of the service interface. The third is at CursorAdapter.ts:582, whereonConfigOptionsChangedisn't included inAcpSessionRuntimeOptions, so it gets silently dropped during a spread (since there's no excess-property checking on spreads) — meaning AcpDriver's callback never fires and model discovery/refresh breaks; the same missing field also affectsAcpAdapterProfile.makeRuntime's input type. I'm now deciding how to present these as inline review comments — whether to combine the two AcpDriver.ts issues (lines 92 and 172) into one comment since they're related, or keep them separate to avoid noise. I'm leaning toward consolidating into a single comment spanning that range. I'll settle on three total comments: one on AcpDriver.ts covering both the missingauthMethodIdinmakeand the missingconnect, one on CursorAdapter.ts:516 for the missingclose, and one on CursorAdapter.ts:583 for the silently droppedonConfigOptionsChanged. I also note the test helper has the same missingauthMethodIdissue, worth mentioning in that first comment. For fixes, the real solution is re-applying the parked AcpSessionRuntime changes across files, though that's not something a simple diff comment can capture, and the authMethodId fix isn't straightforward either. I also want to check whether my earlier comment on AcpSessionRuntime.ts:577 is now stale since that file isn't part of the current changes, so I might mark it outdated — I'll need to fetch its node ID from the review comments first. The AcpAdapterSupport comment, though, is still valid since that code hasn't changed. Let me pull the list of review comments now.
14. github_api_read_only — repos/{owner}/{repo}/pulls/{pull_number}/comments
💭 The old AcpSessionRuntime comment is already marked stale, so I don't need to touch it. Now I want to post my new findings as inline comments — the real issue is that AcpDriver.ts calls connect() on something that isn't the service, and there's a missing authMethodId around lines 92-102. I'll keep each comment short and precise, starting with the line 172 issue. At this commit, the runtime service only exposes initialize() and start(), not connect() — that member was reverted by 75ffa4f and never restored, so the probe doesn't actually type-check; I need to either re-apply the runtime changes or rework the probe to use initialize() and adjust for its response shape. Next, AcpSessionRuntime.make requires an authMethodId that AcpAdapterRuntimeFactory never supplies, so I need to provide an explicit one for the generic profile and update the test helper accordingly. Then there's a similar problem in CursorAdapter.ts where it calls close on the runtime service, which doesn't exist there either since teardown already handles closing elsewhere. I'm also noticing a subtler issue: onConfigOptionsChanged is passed into the runtime options object through a conditional spread, which TypeScript's excess-property checking doesn't catch since spread-introduced properties are exempt from that check — so the option gets silently dropped instead of erroring, meaning model-discovery refresh never actually fires. I need to either add this option properly to the runtime service's options type and thread it through, or remove it from the adapter profile entirely. I'll write up the review with four inline comments covering these findings, all on the RIGHT side of the diff at their respective lines, plus a short cross-cutting note in the body about the parked commit being the root cause — without duplicating the inline details there.
15. modify_pr — Root cause note for the four inline findings: 75ffa4f ("park runtime and mock agent at upstream state before merging main") reverted apps/server/src/provider/acp/AcpSessionRuntime.ts to upstream, and the follow-up merge 39ca2a5 never re-applied the ACP runtime changes. The new consumers (Drivers/AcpDriver.ts, makeAcpAdapter) are therefore written against a service shape that does not exist at this head: AcpSessionRuntime["Service"] has no connect or close, and AcpSessionRuntimeOptions has neither onConfigOptionsChanged nor an optional authMethodId.
Agent Credits: 182 credits
Token usage: 24 uncached input · 1,105,820 cache-read input · 141,863 cache-write input · 11,564 output
Agent Credits may also include non-token charges from external tools such as web research.