Projelere Dön

Telegram Agent

Manage Codex and Claude Code from Telegram. Resume local sessions, review history, and run tasks on your Windows PC. EN / TR.

Proje türü
Open Source
Dil
JavaScript
Yıldız
0
Fork
0

Telegram Agent

English · Türkçe

Manage Codex and Claude Code from Telegram. Resume a saved session on your Windows PC, check the recent conversation, and send your next task from your phone.

Windows Node.js 22+ English and Turkish

Windows tests License: MIT

Download for Windows · Quick start · Commands · Report an issue

Illustrated Telegram example showing a session list, a selected Codex session, and the Start task button

Get started

You need Windows, Node.js 22+, and at least one configured assistant. Download the latest release, then extract the ZIP to a permanent folder. You can also clone the repository.

  1. Create a dedicated bot with BotFather. Open the new bot and send /start.
  2. Double-click Kurulum.vbs and choose English. You can also run npm run setup from the project folder.
  3. Enter your bot token and numeric Telegram user ID. @userinfobot can show your ID.
  4. Check the detected paths to codex.exe and claude.exe. For new sessions, add project entries such as game=D:\Projects\Game.
  5. Select Connect and start. After the bot confirms the connection, send /sessions.

The local setup link lasts 20 minutes. Open Kurulum.vbs again for a fresh link. Baslat.vbs starts the bot and Durdur.vbs stops it. Stop the bot before changing settings. Keep Windows signed in and the PC awake and online. Startup at sign-in is optional.

What you can do

FeatureWhat you can do
Resume a sessionFind recent local sessions and send a task in the original working folder.
Start a sessionChoose a project folder configured during setup.
Check or stop a taskSee elapsed time, receive the result, or stop a task the bot started.
Choose file accessUse read mode by default or enable editing within the assistant’s existing permissions. Confirm every task in Telegram.

Claude Code authentication

For a third-party application, configure Claude Code with an Anthropic Console API key through Claude Code’s supported authentication. You can set an existing Claude profile folder under the executable paths to keep its configuration separate. The bot uses that profile to run the task and the selected local transcript to continue the conversation. It does not read Claude credentials or use the desktop app’s login. For subscription-based access to a live session, Claude provides its own Remote Control and Telegram channel. Anthropic authentication guidance

Telegram commands

EnglishTürkçeAction
/sessions query/oturumlar aramaList and optionally filter sessions
/select 1/sec 1Select a numbered session
/history/gecmisRead recent messages
/status/durumCheck the current task
/stop/durdurStop a task started by the bot
/mode read · /mode edit/mod oku · /mod yazSwitch file access mode
/projects/projelerList configured projects
/new codex game/yeni codex gameStart a session in a configured project
/help/yardimShow commands

Use claude in place of codex for a new Claude Code session. After selecting a session, send a text message and tap Start task. Confirmations expire after five minutes. The bot runs one task at a time for up to 30 minutes.

How it works

flowchart LR
    Phone["Telegram on your phone"] <-->|Private chat| API["Telegram Bot API"]
    Agent["Telegram Agent on Windows"] <-->|HTTPS polling| API
    Agent -->|"Resume saved session"| CLI["Codex CLI / Claude Code CLI"]
    CLI --> Workspace["Local project folder"]

The agent connects to Telegram over outbound HTTPS. The setup page listens only on the PC. Windows DPAPI encrypts the bot token for the current Windows user. Only the configured Telegram account can use the bot in a private chat. Task messages and replies pass through Telegram. Local configuration, logs, and the last result stay under data/, which Git ignores.

Resume sessions after the desktop task finishes. Handle desktop approvals and jobs started outside the bot in the original app. Cloud-only sessions may be absent. Usage limits and tool permissions come from the assistant you run. The current task result shows provider errors. Conversation history filters internal Claude notifications and historical API errors.

Troubleshooting

SymptomWhat to check
Setup link expiredRun Kurulum.vbs again. Each local setup link lasts 20 minutes.
The bot does not replySend /start in a private chat with the bot. Check your numeric user ID and keep the PC awake. Check data/service.log if it still fails.
A session is missingTry a project-name search with /sessions. The list uses locally saved session records.
Claude reports a usage limitCheck the account and plan in the selected Claude Code profile. The bot uses that profile’s limits.

Contributing

Run npm test before opening a pull request. Windows tests run on Node.js 22 and 24 in GitHub Actions. The project has no npm dependencies. For a bug report, include the Windows and Node.js versions, the assistant, and steps to reproduce. Remove tokens, local paths, and private session text from logs before sharing. Open an issue

License

Telegram Agent is available under the MIT License.