Repository navigation
Releases
v0.6.0
v0.6.0 · 2026-11-28
This release improves multi-user history recovery, bridge updates, and Telegram reply diagnostics.
English
- The bridge creates fresh Codex homes for members and guests at startup and copies eligible thread history. If some history cannot be read, the bridge keeps its source and retries on the next start. The cleanup process removes old login copies and retires old homes, including runtime links and sockets.
/doctorreports copy failures, quarantined homes, and damaged generation records that stop cleanup. - Roles stay available if a successful hook check cannot be saved.
/doctorreports the write failure and the bridge repeats the check at the next start. - The state directory needs a file system with hard-link support for multi-user mode. If startup reports that hard links are unavailable, move the state directory to a file system that supports them or turn off
KROT_MULTIUSER. - If you roll back to v0.5, that version cannot see chats saved in
codex-public/generations/. A later upgrade resumes from those generations and does not import chats written by v0.5 during the rollback. /updateand startup recovery share one lock per checkout. The lock stays held throughout recovery and is released even if a child process outlives it./updatereports a missingflockutility or a lock error separately from an update in progress.- New reply plans mask values that become visible only after formatting is removed. Plain-text fallbacks mask across message boundaries and split masked text that exceeds Telegram's message limit.
- Render diagnostics use the text or document body sent to Telegram. The bridge removes old reply excerpts from render history and moves corrupt history files aside with a warning. Editing a Rich Message also updates its preview.
Русский
- При запуске мост создаёт новые папки Codex для участников и гостей и переносит доступную историю их чатов. Если часть истории не удаётся прочитать, мост сохраняет исходную папку и повторяет перенос при следующем запуске. Очистка удаляет старые копии данных входа и прежние папки ролей вместе с созданными Codex ссылками и сокетами.
/doctorпоказывает ошибки переноса, папки в карантине и повреждённые записи, из-за которых остановилась очистка. - Роль остаётся доступной, если результат успешной проверки хука не удалось сохранить.
/doctorпоказывает ошибку записи, а при следующем запуске мост повторяет проверку. - Для многопользовательского режима нужна файловая система с поддержкой жёстких ссылок в папке состояния. Если мост сообщает об их отсутствии, перенесите папку состояния на подходящую файловую систему или выключите
KROT_MULTIUSER. - После отката на v0.5 чаты из
codex-public/generations/недоступны этой версии. При повторном переходе на v0.6 мост продолжит работу с этими папками. Чаты, записанные v0.5 после отката, в них не появятся. /updateи восстановление при запуске используют одну блокировку на копию репозитория. Блокировка держится до конца восстановления и освобождается, даже если дочерний процесс продолжает работать./updateотдельно сообщает об отсутствииflock, ошибке блокировки и уже идущем обновлении.- При подготовке новых ответов мост скрывает значения, которые становятся видимыми после удаления разметки. При отправке обычным текстом мост скрывает значения на границах сообщений и разбивает текст, если после маскировки он превышает лимит Telegram.
- Диагностика отображения использует отправленный текст или содержимое документа. Мост удаляет старые отрывки ответов из истории диагностики, а повреждённые файлы истории откладывает отдельно и пишет предупреждение. Правки форматированных сообщений Telegram также обновляют их предпросмотр.
v0.5.2
- The bridge guard blocks service changes that target the bridge through broad
systemctlselectors. It checks each command in a chain independently. - Owner voice transcripts in private chat follow the same memory rules as typed
messages, with no confirmation card. Replies to the bot's own messages can
count as direct owner input. Replies to forwarded or foreign content cannot
grant memory write access. /stopprevents an in-flight transcription from starting a Codex turn after cancellation.- Memory save notices are off by default. Set
KROT_BRAIN_SAVE_NOTICE=onfor a
text notice with a/memory forget <id>command. /memory forget <id>deletes immediately in Brain and legacy learning. Brain
still checks the fact's revision before deleting it./memory pendingshows text commands by default. Set
KROT_BRAIN_REVIEW_BUTTONS=onfor review and page buttons. Text approval
refuses to overwrite a fact that changed since the proposal was created.
Full changelog: https://github.com/qwwiwi/codex-cli-telegram-plugin/blob/main/CHANGELOG.md
v0.5.1
v0.5.1 · 2026-11-27
Fixes for issues reported by the community (#12, #13, #14, #15, #16, #17, #18, #20, #21). Thank you, @martinmute.
English
- Updates no longer fail on a loaded server: the staged test run in
update.shand automatic update uses a 60-second per-test timeout (KROT_UPDATE_TEST_TIMEOUT_MS). A failing test still blocks the update. (#20) - Several agents under one Linux user:
install.sh --service-name NAMEgives each copy its own systemd service. If an existing service belongs to another checkout, the installer stops with a clear message instead of reusing it. The default name stayskrotov-telegram.service. (#18) - Inter-agent mail: the sender is recognised in both header forms (
[Inter-agent от X → Y]and[Inter-agent from X -> Y]). The owner notice is one clean line by default;KROT_AGENT_WEBHOOK_OWNER_NOTICE=full|brief|offcontrols it, andoffsends nothing to the owner. (#17, #21) - A link to a local file is shown as a code path and no longer drops the formatting of the whole reply. (#14)
/mirrorshows one line per command, never raw command output, and collapses when the turn ends. (#15)- After Telegram refuses widgets for a bot, the bridge stops sending them until restart, and
/doctorsays whether widgets are available. (#16) /doctorwarns when approvals are off and an MCP server lacksdefault_tools_approval_mode = "approve"; the install guide explains it. (#12)- The known-problems map explains why
systemctl statusfails inside the workspace-write sandbox. (#13)
Русский
- Обновление больше не падает на нагруженном сервере: тесты в отдельной копии идут с таймаутом 60 секунд на тест (
KROT_UPDATE_TEST_TIMEOUT_MS). Упавший тест по-прежнему не пускает обновление. (#20) - Несколько агентов под одним пользователем:
install.sh --service-name ИМЯдаёт каждой копии свою службу. Если служба принадлежит другой копии, установщик останавливается с понятным сообщением. Имя по умолчанию прежнее –krotov-telegram.service. (#18) - Почта между агентами: отправитель распознаётся в обоих видах заголовка. Уведомление владельцу – одна чистая строка;
KROT_AGENT_WEBHOOK_OWNER_NOTICE=full|brief|offуправляет им,offничего не шлёт. (#17, #21) - Ссылка на локальный файл показывается как путь в коде и не ломает форматирование ответа. (#14)
/mirrorпоказывает по строке на команду, без сырого вывода, и сворачивается после хода. (#15)- Если Telegram не принимает виджеты для бота, мост перестаёт их слать до перезапуска, а
/doctorпоказывает, доступны ли они. (#16) /doctorпредупреждает, когда подтверждения выключены, а у MCP-сервера нетdefault_tools_approval_mode = "approve"; это описано в инструкции по установке. (#12)- Карта известных проблем объясняет, почему
systemctl statusне работает в песочнице workspace-write. (#13)
v0.5.0
v0.5.0 · 2026-11-27
English
- Multi-user mode lets other people talk to your bot with limited rights. It is off by default; turn it on with
KROT_MULTIUSER=1. You stay the only owner. Add members and guests with/users(including a one-time invite code) orKROT_MEMBER_USER_IDS, and approve groups with/chats. Their messages run in a separate Codex per role without shell or file tools, with only the skills, MCP servers and web search you allow inpublic-access.toml, and never reach your memory. The bridge starts in this mode only after the permission hook with--thread-roleand the other safety checks pass. Setup - The agent now sees how Telegram showed its replies. If a reply came out with raw markup, broken formatting, as a file or split in the middle of a block, the next turn gets one short note. The
render_previewtool shows a Telegram-like picture of a reply or a draft, and/doctorlists the last differences. Reply text is never written to disk. /doctor testsruns a short self-check: settings, the Telegram bot, the Codex connection, the hooks pack and the state folder, with pass or fail for each.- Install by link: give Codex the repository link and ask it to follow AGENT_INSTALL.md. It checks the tools, installs, runs the tests and
/doctor tests, and reports back. - Automatic updates are off by default. With
KROT_AUTO_UPDATE=1the bridge checks for a new version every 6 hours (KROT_AUTO_UPDATE_HOURS), tests it in a separate copy and installs it only while idle. A version that keeps crashing is rolled back and never installed automatically again./cc updatechecks on demand. Automatic update - Brain fixes: forwarded and foreign text stays out of owner side threads, and member and guest conversations stay out of owner memory.
/statusand/doctorshow the prompt-cache share.
Known limitations
- Automatic update: do not start a manual
/cc updatewhile an automatic one may be running. Two updates at the same moment can lose the recovery record of one of them; a kernel-level lock is planned for the next release. - Multi-user mode: keep
HOMEandCODEX_HOME(and any symlinks to them) outside the bridge state folder. A link placed inside a role folder is removed when the role folder is cleaned.
Русский
- Многопользовательский режим позволяет другим людям писать вашему боту с ограниченными правами. По умолчанию он выключен; включается через
KROT_MULTIUSER=1. Владелец остаётся один – вы. Участников и гостей добавляет/users(в том числе одноразовым кодом-приглашением) илиKROT_MEMBER_USER_IDS, группы подтверждает/chats. Их сообщения обрабатывает отдельный Codex для каждой роли: без команд и правки файлов, только с навыками, MCP-серверами и веб-поиском, которые вы разрешили вpublic-access.toml, и без доступа к вашей памяти. Мост запускается в этом режиме только после проверки хука разрешений с флагом--thread-roleи других проверок безопасности. Настройка - Агент теперь видит, как Telegram показал его ответы. Если ответ пришёл с сырой разметкой, сломанным форматированием, файлом или разрезанным посреди блока, следующий ход получает одну короткую заметку. Инструмент
render_previewпоказывает картинку ответа или черновика, как в Telegram, а/doctor– последние расхождения. Текст ответов на диск не пишется. /doctor testsзапускает короткую самопроверку: настройки, бот в Telegram, связь с Codex, пакет хуков и папка состояния, по каждому пункту – «прошло» или «не прошло».- Установка по ссылке: отправьте Codex ссылку на репозиторий и попросите выполнить AGENT_INSTALL.md. Агент проверит инструменты, установит мост, запустит тесты и
/doctor testsи отчитается. - Автообновление по умолчанию выключено. С
KROT_AUTO_UPDATE=1мост раз в 6 часов (KROT_AUTO_UPDATE_HOURS) ищет новую версию, проверяет её в отдельной копии и ставит только в простое. Версия, которая падает, откатывается и больше не ставится автоматически./cc updateпроверяет обновление сразу. Автообновление - Исправления Brain: пересылки и чужой текст не попадают в параллельные потоки владельца, а разговоры участников и гостей – в его память.
/statusи/doctorпоказывают долю входа из кеша.
Известные ограничения
- Автообновление: не запускайте
/cc updateвручную, пока может идти автоматическое. Два обновления в один момент могут потерять запись для отката одного из них; блокировку на уровне ядра добавим в следующей версии. - Многопользовательский режим: держите
HOMEиCODEX_HOME(и ссылки на них) вне папки состояния моста. Ссылка внутри папки роли удаляется при её очистке.
v0.4.0
v0.4.0 · 2026-11-27
English
- On Linux, full access lets the agent work anywhere its dedicated system user has access. Run
./install.sh --hooksas that user, review and run the printedsudo install …line, then rerun the installer and check/doctor. The bridge grants full access only after the system-wide managed hooks pass its checks. The hooks protect Codex home instruction files, includingAGENTS.md. - Brain remembers facts and open tasks from the owner's private chat. Start with
/memory. Forwarded and foreign input stays separate from owner memory. PreCompact saves a handoff before Codex shortens the conversation, and the SessionStart context has a limit. - Telegram sends recheck an extended rate-limit cooldown. Reply splitting preserves chunk boundaries, and saved replies are migrated safely before retry. Issue #4 · Issue #7
/usageshows token trends for 1, 7 or 30 days. Brain leads by default. On a fresh install with Brain off, the local backend defaults to native Codex memories when the setting is unset. Explicit settings and--no-memoriesare honored. Usage analytics · Native memory settings
Русский
- В Linux полный доступ позволяет агенту работать везде, куда имеет доступ его отдельный системный пользователь. Запустите
./install.sh --hooksот этого пользователя, проверьте и выполните выведенную строкуsudo install …, повторите установку и откройте/doctor. Полный доступ включается после проверки системных хуков, которые защищают инструкции Codex, включаяAGENTS.md. - Brain запоминает факты и открытые задачи из личного чата владельца. Начните с
/memory. Пересылки и чужие сообщения изолированы от памяти владельца. PreCompact сохраняет краткое состояние перед сжатием, а объём контекста при запуске сессии ограничен. - Отправка в Telegram учитывает продление паузы после ограничения частоты. Длинные ответы делятся по безопасным границам, а сохранённая очередь обновляется перед повторной отправкой. Issue #4 · Issue #7
/usageпоказывает расход за 1, 7 или 30 дней. По умолчанию памятью управляет Brain. При новой установке с выключенным Brain локальный Codex включает встроенную память, если выбор не задан явно и не указан--no-memories. Статистика · Настройки встроенной памяти
v0.3.1.1
v0.3.1.1
A fix release on top of v0.3.1. No new settings and no migration: update with
./update.sh and restart the bot when it is idle.
What changed
Paragraphs are preserved in long replies
Before, almost every reply went out as a Rich Message, and Telegram shows the
paragraphs of a Rich Message without the empty line between them, so a long answer
read as one solid block. Now plain prose (paragraphs, bold, lists, inline code) is sent
as Telegram HTML with the blank lines as written. A Rich Message is used only when the
reply carries Markdown that only Telegram renders: a table, math, a task list,
<details> or a footnote.
Long HTML replies are split only between tags and entities, within the length Telegram
counts after parsing, and every open tag is closed and reopened across parts. Edits the
owner asks for (/edit or in plain words) are rendered as HTML as well, so Markdown no
longer shows up as literal ** markers.
Visible verified or unverified sender on inter-agent messages
A message that arrives through the agent webhook now shows who sent it:
fromAgentin the JSON body, or theX-From-Agentheader: the sender is
verified (the authenticated caller named it);- else a leading
[Inter-agent от <sender> → <recipient>]line at the very start of
the message: the name is shown with «(не подтверждён)», unverified, because any
caller can write that line; - else
unknown.
agentId is accepted and ignored for display. The verified flag is saved with the
queued message, so it survives a restart, and it is carried into the Codex turn, the
side-thread prompt, the recovery notice and the final reply. A trailing delivery
protocol block after a --- line (ПОРЯДОК ДЕЙСТВИЙ: and its ack-only variant) is
labelled for Codex as delivery protocol, not as the sender's request, and only when the
body carries fromAgent. Details: plugin/docs/install.md.
Parallel replies without false "parallel stream" errors
With parallel side threads on (KROT_CODEX_PARALLEL=1), several owner messages sent
while a task ran could get their status cards and answers late, one after another,
released only by a 30-second HUD guard, so a healthy parallel turn looked broken. The
cause was the per-chat minute budget being filled by status edits and HUD card
refreshes. Now:
- the owner's replies (final and interim) have their own send queue and three reserved
slots of the minute budget; - status edits leave room for sends;
- a HUD card move skips refreshes queued before it, and HUD edits stay in order;
- an interim reply waits for the HUD card like the final reply, so it lands below it;
- a side-thread card keeps one edit in flight and drops the pending line when it closes;
- the "your message is queued" notice is sent only if the message still waits, and is
cancelled or deleted when the message is picked up.
Secret redaction for queued and replayed messages
Configured secrets are now masked in the source text before it is rendered to HTML, on
the reply path, the interim reply path and the edit path, so a secret with &, <,
> or quotes can no longer slip past redaction after escaping. Reply parts saved by an
older version of the outbox are joined, redacted and re-split when loaded, so a secret
cut across two saved parts is masked before the bridge replays them after a restart.
The error journal masks explicit credential fields whatever their value is.
Link-preserving fallback
When Telegram refuses the HTML of a part, the bridge sends the plain text Telegram would
have shown instead of the escaped HTML: tags dropped, entities decoded, and link
destinations kept after their text as «text (url)» while the part still fits Telegram's
limit. Plain-text and MarkdownV2 messages are split by raw length, without HTML tags
inserted.
Smaller fixes
- A diagram Telegram's renderer refuses (for example a flowchart with a cycle) is sent
as numbered steps with links by name, instead of raw node kinds and index pairs. - A reply resumed after a restart uses the chunking its saved receipts were counted
with, so no text is lost or repeated.
Known limitations
See issue #7.
v0.3.1
Brings main up to the version running in production.
v0.2
- Autonomous by default: approval mode
never, no confirmation cards. - Telegram widget components (16 HTML packs) the agent can send and update.
- Known Codex CLI problems map with status and mitigation per row.
- Instruction-conflict audit and a generic agent profile.
v0.3
- Parallel side threads (up to 7) next to the main turn, each with its own status card.
- Context card (HUD) with weekly limits; the card stays below the newest owner message.
- Model and reasoning-effort buttons.
- Daily error journal (default 14 days) that the agent can read;
/doctorreports repeated warnings.
v0.3.1
- Paragraph grouping for single-newline answers; no lost rows when a reply resumes.
- Side turns that only reacted end silently instead of «не вернул ответ».
- Contributors section.
Tests: full bun suite green, tsc --noEmit clean, every live acceptance requirement has a passing tagged test (manifest-check 20/20).
v0.1.0
codex-cli-telegram-plugin v0.1.0
First public release. A Telegram bridge for OpenAI Codex (codex app-server), fork
of Krotov-plugin by Pavel Krotov (Apache-2.0, see NOTICE); fork point upstream
bb1d1ce. Per-commit details for the first changes: CHANGES.md.
What is in it
- Parallel side threads (opt-in). Off by default; turn on with
KROT_CODEX_PARALLEL=1. Then a new message that arrives while a task runs gets its
own side thread instead of waiting.KROT_CODEX_MAX_PARALLELsets the total number
of threads with the main one: default 2, at most 8, so up to 7 side threads. Side
threads fork from the main thread so they can reuse its prompt cache (hit rate not
measured yet). - HUD card over the answer. The pinned card with context use, model, limits and
the cached share of the last turn moves under each new message, right above the
reply. - Limits as used percent. How much of each Codex limit window is spent, weekly
window first, with the reset time. - Agent webhook. Other agents can send the bot a message over HTTP (token and/or IP
allowlist required). Their turns run under a restricted policy: no approvals,
workspace-write sandbox, no access to your memory, attachments or bot restart. - MCP servers. How to connect any MCP server is in
plugin/docs/install.md. - Also: autonomous sandbox mode (
KROT_CODEX_SANDBOX),GH_CONFIG_DIRpassed to
Codex, cleanup of the bot's own pin service messages.
Inherited from upstream, documented:
- Codex subagents. With
multi_agent_v2on in Codex, approval requests from
subagents reach you as Telegram cards. This comes from the upstream fork point;
v0.1.0 keeps it and documents it.
Install: see README.md. Full list: CHANGELOG.md. Next steps: ROADMAP.md.
Коротко по-русски
Первый публичный релиз: Codex в Telegram с карточкой контекста над ответом, лимитами
в процентах и вебхуком для сообщений от других агентов.
Параллельные ветки включаются отдельно: KROT_CODEX_PARALLEL=1. По умолчанию всего
2 ветки (основная и одна боковая); KROT_CODEX_MAX_PARALLEL поднимает предел до 8,
то есть максимум 7 боковых веток. Боковая ветка ответвляется от основной, чтобы
переиспользовать её кеш промпта (доля попаданий в кеш пока не измерена).
Субагенты Codex (multi_agent_v2) унаследованы от исходного проекта: в этом релизе
они сохранены и описаны.