Add session permission support to background agents for denying questions

Implements question-denied session permission rules when creating child
sessions via background task delegation. This prevents subagents from
asking questions by passing explicit permission configuration during
session creation.

🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode
This commit is contained in:
YeonGyu-Kim
2026-03-11 16:40:30 +09:00
parent 24f4e14f07
commit 413e8b73b7
12 changed files with 233 additions and 2 deletions
@@ -7,6 +7,7 @@ import { formatDuration } from "./time-formatter"
import { formatDetailedError } from "./error-formatting"
import { getSessionTools } from "../../shared/session-tools-store"
import { normalizeSDKResponse } from "../../shared"
import { QUESTION_DENIED_SESSION_PERMISSION } from "../../shared/question-denied-session-permission"
export async function executeUnstableAgentTask(
args: DelegateTaskArgs,
@@ -35,6 +36,7 @@ export async function executeUnstableAgentTask(
skills: args.load_skills.length > 0 ? args.load_skills : undefined,
skillContent: systemContent,
category: args.category,
sessionPermission: QUESTION_DENIED_SESSION_PERMISSION,
})
const timing = getTimingConfig()