Home / Projects / NiPlex-Harness / Architecture / Concurrency

Pictures

Concurrency

Each Telegram chat and each Discord channel has its own lock. A second message waits until the first finishes. Different chats can run at the same time.

Since 2 Sept 2026 · Updated 29 Oct 2026

Rules

  • One asyncio lock per chat (Telegram) or channel (Discord).
  • Waiting messages run in arrival order.
  • The agent call runs in a worker thread so the bot stays responsive.

Session ids

  • Telegram: tg_<chat id>.
  • Discord: dc_<channel id>. One agent and one approval session per channel, not per user.

Limit

Allow Session in a Discord channel applies to everyone allowed in that channel.

Checked against the source at commit f4fd89f on 29 Oct 2026. Everything here is merged on the main branch; no release has been tagged yet. The source is private, so these pages are the public description.