feat(subagent): block question tool at both SDK and hook level

- Add permission: [{ permission: 'question', action: 'deny' }] to session.create()
  in background-agent and delegate-task for SDK-level blocking
- Add subagent-question-blocker hook as backup layer to intercept question tool
  calls in tool.execute.before event
- Ensures subagents cannot ask questions to users and must work autonomously
This commit is contained in:
justsisyphus
2026-01-27 11:03:44 +09:00
parent 04500bae7d
commit de439edc22
6 changed files with 123 additions and 2 deletions
+1
View File
@@ -33,3 +33,4 @@ export { createStartWorkHook } from "./start-work";
export { createAtlasHook } from "./atlas";
export { createDelegateTaskRetryHook } from "./delegate-task-retry";
export { createQuestionLabelTruncatorHook } from "./question-label-truncator";
export { createSubagentQuestionBlockerHook } from "./subagent-question-blocker";