Skip to content

Add Telegram topics as resumable native Codex human sessions #234

Description

@compaii

Outcome

Expose the existing native Codex embodiment through a human Telegram chat. Each private-chat topic owns a distinct persistent native Codex thread/context. The human can create topics, continue conversations, stop a running turn and explicitly hand a selected thread between Telegram and the native CLI. Topic sessions are harness conversations, not new beings, incarnations or Matrix identities.

Nicolás reviewed the proposal and explicitly authorized implementation: a dedicated bot for this Codex surface, a reusable Codex plugin/skill/MCP package in AlterMundi/Skills, and an AlterMundi fork for any adopted upstream bridge, with upstream PRs when appropriate. The original Matrix skills exercise remains active; Telegram is an additional authorized human interface, not a peer-delivery fallback.

Observed existing surfaces

The configured CompAII Hermes bot already supports private-chat topics and user-created topics. Hermes owns its Telegram input. The existing Matrix/Tribu Telegram mirror shares that bot and is an output projection, not an interactive native Codex gateway. A separate competing update consumer for the same bot is therefore not an acceptable installation strategy.

The current Hermes source already supports both Telegram topic/session bindings and an optional native Codex app-server runtime. Its composed Hermes persona and prior transcript are supplied to the native Codex thread and it retains its own session/memory/skill-review machinery. Reuse needs to account for those harness differences; changing the existing Hermes profile globally is not the proposed deployment.

Codex exposes native persistent thread/start, thread/resume, turn/start, steering and interruption through app-server: https://learn.chatgpt.com/docs/app-server . Telegram supports private-chat topics and user-created topics: https://core.telegram.org/bots/api#user and https://core.telegram.org/bots/api#createforumtopic .

Options under discussion

  1. Adopt a direct existing Telegram-to-Codex bridge at an exact reviewed commit, with reproducible body-local wiring. Prefer native app-server and native Codex thread continuity. Candidate examples are https://github.com/Headcrab/telecodex (app-server, topic persistence, explicit thread selection) and https://github.com/benedict2310/telecodex (SDK, topic routing, explicit attach/CLI handback). These are candidates, not installed/qualified winners. Evaluate private DM topics and current Codex compatibility with focused checks before selection.
  2. Reuse Hermes' Telegram gateway and its optional Codex runtime. This provides its established topic/attachment UI but also carries Hermes-owned prompt/history and lifecycle mechanisms; preserving the current Codex embodiment requires an explicit compatible profile/routing design.
  3. Build a small owned adapter only if qualified reuse cannot meet the required semantics. Own reproducible Matrix onboarding and deployment either way; keep upstream ownership and fixes in the appropriate implementation repository.

Authorized topology: a dedicated bot for this Codex surface, using the existing local Codex authentication/configuration and identity/memory/skills bindings. An alternative is one existing bot with topic-to-harness routing inside its single receiving gateway. Use a dedicated bot; keep its token, authorized human/chat and embodiment bindings local. Telegram transport (webhook or long polling) must be explicit in the deployment plan; current candidate bridges use long polling. The original skills exercise's prohibition on added background polling/hooks/timers does not authorize quietly activating a listener during this proposal.

Acceptance criteria

  • Review the concrete proposal with the human before implementing or activating the chat.
  • Pin the selected implementation; provide reproducible installation/configuration, qualification, service health, rollback and owner-local credentials.
  • Preserve the existing signed body, identity/custody, native Codex auth/history/configuration, shared neutral skills and body-specific HMK behavior. Keep personal preferences and secrets local.
  • Persist an unambiguous bot/chat/topic to native Codex thread mapping across service restart; two topics retain independent contexts, including identical topic IDs in different chats.
  • Return replies/progress/files to the originating topic; support human interruption and follow-up input without duplicate turns after update replay/restart.
  • Prove explicit CLI-to-Telegram and Telegram-to-CLI continuation of a selected native thread, with one active writer and clear busy/handoff behavior.
  • Limit interactive ingress to the authorized human/chat and keep other Hermes topics operating. Every inference turn originates in an authorized human message or an explicitly requested goal continuation; Telegram input does not widen native authority.
  • Validate the actual receiving harness loads the intended AGENTS/skills/memory bindings; do not equate copied persona text or a bot reply with continuity.
  • Record operational state in this issue/project context. Matrix peer inbox attention and delivery remain separately tracked in Support explicit human-scoped foreground inbox monitoring and task replies #231/Repair native sealed /we conversation returning internal_error in the live pilot #233; this human chat is not a workaround for Deliver portable shared skills from AlterMundi/Skills through human-requested /we updates #228's authenticated /we acceptance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:codexCodex incarnation adapterpriority:P1Important V0 worktype:implementationImplementation producing one verifiable result

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions