Skip to content

Commit b17235c

Browse files
kitlangtonmrsimpson
authored andcommitted
fix(effect): suspend agent default layer construction (anomalyco#21732)
1 parent 659b2fb commit b17235c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

packages/opencode/src/agent/agent.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,13 @@ export namespace Agent {
393393
}),
394394
)
395395

396-
export const defaultLayer = layer.pipe(
397-
Layer.provide(Provider.defaultLayer),
398-
Layer.provide(Auth.defaultLayer),
399-
Layer.provide(Config.defaultLayer),
400-
Layer.provide(Skill.defaultLayer),
396+
export const defaultLayer = Layer.suspend(() =>
397+
layer.pipe(
398+
Layer.provide(Provider.defaultLayer),
399+
Layer.provide(Auth.defaultLayer),
400+
Layer.provide(Config.defaultLayer),
401+
Layer.provide(Skill.defaultLayer),
402+
),
401403
)
402404

403405
const { runPromise } = makeRuntime(Service, defaultLayer)

0 commit comments

Comments
 (0)