INNER CODE UNIT · TypeScript
requestSlackCreateAgentHold
nanocoai/nanoclaw · .claude/skills/slack-agent-flow/src/modules/slack-agent-flow/index.ts:217
async function requestSlackCreateAgentHold(content: Record<string, unknown>, session: Session): Promise<void> {
if (!(await isSlackOriginSession(session))) {
await requestCreateAgentHold(content, session);
return;
}
const name = typeof content.name === 'string' ? content.name : '';
const instructions = typeof content.instructions === 'string' ? content.instructions : null;
const sourceGroup = await getAgentGroup(session.agent_group_id);
if (!sourceGroup) return;
await requestApproval({
session,
agentName: sourceGroup.name,
action: 'create_agent',
// allow_guests must survive the hold: the approved replay re-enters the
// wrapper with this payload, and dropping it would silently upgrade a
// guest-accessible request to the agent-view variant.
payload: {