Skip to content

Merge branch 'main' into t3code/codex-launch-args

MacroscopeApp / Macroscope - Effect Service Conventions failed Jun 21, 2026 in 3m 30s

Effect Service Conventions: 1 issue found

1 finding in apps/server/src/provider/Layers/CodexSessionRuntime.ts.

  • Command arguments leaked into error attribute/message (line 748): The spawn failure handler now builds CodexAppServerSpawnError with command: \${options.binaryPath} ${appServerArgs.join(" ")}`, embedding arbitrary user-configured launchArgsinto thecommandattribute. That attribute is rendered verbatim by the error'smessage getter (Failed to spawn Codex App Server process for command: ${this.command}). The error conventions require direct error attributes and messages to stay bounded and forbid copying command arguments into them \u2014 the underlying value should be preserved only via cause. The probe construction site (CodexProvider.ts:354) deliberately keeps this bounded to `${input.binaryPath} app-server``; the runtime path should match it.

An inline review comment with a suggested fix has been 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.

Scope reviewed: changed TypeScript files matching the configured include patterns, focused on Effect service conventions (imports/namespaces, service definition order, errors/predicates, file layout).

Findings considered but not flagged:

  • The new helpers codexAppServerArgs, codexExecLaunchArgs (CodexProvider.ts) and codexSessionAppServerArgs (CodexSessionRuntime.ts) are pure functions, correctly exported as named exports and imported via named imports \u2014 consistent with the convention that pure helpers do not require namespace imports.
  • Effect library modules are imported as subpath namespaces (effect/Effect, effect/Layer, etc.) in all touched files; no consolidated "effect" named imports were introduced.
  • The packages/contracts/src/settings.ts schema additions (launchArgs) use standard Effect Schema combinators and are consistent with surrounding code.
  • The added tests accompany a genuine behavior change (passing launch args through to spawned processes), so they are appropriate focused tests rather than redundant refactor proofs.

The single failing finding concerns the error attribute/message safety convention at CodexSessionRuntime.ts:748.


Tool Calls

# Tool Description
1 github_api_read_only Show the definition of CodexAppServerSpawnError in effect-codex-app-server errors module, including all its fields and how the command field is used in its message getter. Also show everywhere the C...
2 modify_pr The Effect Service Conventions check found one issue with how the spawn error captures the launch command. See the inline comment.

Agent Credits: 89 credits