  const sendToAgentAccepted: typeof sendToAgentAcceptedUnlocked = async (...args) => {
    const [sessionId] = args;
    if (typeof sessionId !== 'string') return await sendToAgentAcceptedUnlocked(...args);
    await assertReviewExternalInputAllowed(sessionId);
    await reconcileBotModelRoute(sessionId);
    const compactedRuntime = maker.getSession(sessionId);
    if (compactedRuntime) await refreshBotCapabilityEpochBeforeSend(compactedRuntime);
    return await withSendToSessionLock(sessionId, async () => {
      await reconcileBotModelRoute(sessionId, true);
      const [botInput] = await getDbClient()
        .drizzle.select({
          source: sessions.source,
          role: botSessionLinks.role,
          profileStatus: botProfiles.status,
          hiddenAt: botProfiles.hiddenAt,
        })
        .from(sessions)
        .leftJoin(botSessionLinks, eq(botSessionLinks.sessionId, sessions.id))
        .leftJoin(botProfiles, eq(botProfiles.id, botSessionLinks.botId))
        .where(eq(sessions.id, sessionId))
        .limit(1);
      const blocked = botSessionInputBlockReason(botInput ?? null);
      if (isDeviceLinkInvoke() && botInput?.source === 'bot' && (botInput.hiddenAt || botInput.profileStatus === 'archived')) {
        throwIpcError('NOT_FOUND', 'Session does not exist');
      }
      if (blocked) throwIpcError('PRECONDITION_FAILED', blocked);
      if (inputCoordinator.isExecutionPaused(sessionId)) {
        throwIpcError('PRECONDITION_FAILED', 'Task is paused; resume it before continuing');
      }
      return sendToAgentAcceptedUnlocked(...args);
    });
  };