Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): queue background notifications during active tools #15892

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/15892/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 8 changed files with 119 additions and 1 deletion (loading 6).

x
0 of 8 viewed, 8 left
85 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -871,6 +871,20 @@
});
​
describe("ClaudeAdapterV2 session permissions", () => {
+ it("keeps explicit user refusals classified as user_reject", () => {
+ const result = ClaudeAdapterV2.permissionResultFromDecision({
+ toolName: "Bash",
+ decision: "decline",
+ toolInput: { command: "make" },
+ toolUseID: "denied-build",
+ });
+ assert.equal(result.behavior, "deny");
+ if (result.behavior !== "deny") return;
+ assert.equal(result.decisionClassification, "user_reject");
+ assert.equal(result.message, "User declined tool execution.");
+ assert.equal(result.interrupt, undefined);
+ });
+​
it("forces suggested permission updates to session scope", () => {
const result = ClaudeAdapterV2.permissionResultFromDecision({
toolName: "Bash",
@@ -2480,6 +2494,77 @@
}).pipe(Effect.scoped, Effect.provide(Layer.merge(IdAllocator.layer, NodeServices.layer))),
+ it.effect.each(["cancelled", "denied", "permission_denied", undefined])(
+ "preserves native tool non-execution metadata %s without inferring a denial from text",
+ (kind) =>
+ Effect.scoped(