Skip to content

refactor(tool): Tool.Context.metadata returns Effect#21972

Merged
kitlangton merged 2 commits intodevfrom
worktree-agent-a59bf3e4
Apr 11, 2026
Merged

refactor(tool): Tool.Context.metadata returns Effect#21972
kitlangton merged 2 commits intodevfrom
worktree-agent-a59bf3e4

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Change Tool.Context.metadata from () => void to () => Effect.Effect<void>, matching the pattern already used by Tool.Context.ask
  • Remove run.promise wrappers in prompt.ts metadata callbacks since the Effect is now yielded in the fiber
  • Update all tool callsites (bash.ts, edit.ts, task.ts) to yield* the metadata Effect
  • Update all test mocks to return Effect.void

Test plan

  • bun run typecheck passes (no new errors)
  • bun run test test/tool/ — 167 tests pass
  • bun run test test/session/prompt-effect.test.ts — 34 tests pass

@kitlangton kitlangton merged commit 3dd0914 into dev Apr 11, 2026
8 of 10 checks passed
@kitlangton kitlangton deleted the worktree-agent-a59bf3e4 branch April 11, 2026 03:12
mrsimpson pushed a commit to mrsimpson/opencode that referenced this pull request Apr 14, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant