Skip to content

refactor(tool): use Session.Service directly in TaskTool#21975

Merged
kitlangton merged 1 commit intodevfrom
worktree-agent-a7964dca
Apr 11, 2026
Merged

refactor(tool): use Session.Service directly in TaskTool#21975
kitlangton merged 1 commit intodevfrom
worktree-agent-a7964dca

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Convert TaskTool to use yield* Session.Service instead of calling Session.get/Session.create facades through Effect.promise, eliminating unnecessary runtime roundtrips
  • The sessions.get call uses Effect.catchCause to handle NotFoundError (a thrown exception) gracefully, matching the original .catch(() => undefined) behavior

Test plan

  • bun test test/tool/task.test.ts — all 6 tests pass
  • bun test test/session/ — all 242 tests pass
  • bun run typecheck — no new errors in src/

@kitlangton kitlangton force-pushed the worktree-agent-a7964dca branch from 77ab07c to 1979a7a Compare April 11, 2026 03:15
@kitlangton kitlangton merged commit 4341ab8 into dev Apr 11, 2026
7 of 9 checks passed
@kitlangton kitlangton deleted the worktree-agent-a7964dca branch April 11, 2026 03:18
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