fix(task): preserve restricted agent tools in sync continuation

Restore sync continuation to apply agent tool restrictions after permissive defaults so resumed explore and librarian sessions cannot regain nested delegation. Add regression tests for resumed restricted agents while keeping plan-family continuation behavior intact.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-03-24 23:54:29 +09:00
parent cea8769a7f
commit 984464470c
2 changed files with 209 additions and 1 deletions
+1 -1
View File
@@ -85,10 +85,10 @@ export async function executeSyncContinuation(
const allowTask = isPlanFamily(resumeAgent)
const effectivePrompt = buildTaskPrompt(args.prompt, resumeAgent)
const tools = {
...(resumeAgent ? getAgentToolRestrictions(resumeAgent) : {}),
task: allowTask,
call_omo_agent: true,
question: false,
...(resumeAgent ? getAgentToolRestrictions(resumeAgent) : {}),
}
setSessionTools(args.session_id!, tools)