Skip to content

Commit 341130f

Browse files
lu-zeroclaude
andcommitted
fix(mcp): pass tool name and args to permission ask
Fixes anomalyco#19549 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 193de13 commit 341130f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/opencode/src/session/tools.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ export const resolve = Effect.fn("SessionTools.resolve")(function* (input: {
405405
{ args },
406406
)
407407
const result: Awaited<ReturnType<NonNullable<typeof execute>>> = yield* Effect.gen(function* () {
408-
yield* ctx.ask({ permission: key, metadata: {}, patterns: ["*"], always: ["*"] })
408+
yield* ctx.ask({ permission: key, metadata: args, patterns: [key], always: [key] })
409409
return yield* Effect.promise(() => execute(args, opts))
410410
}).pipe(
411411
Effect.withSpan("Tool.execute", {

0 commit comments

Comments
 (0)