<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: julianchun</title>
    <description>The latest articles on Forem by julianchun (@julianchun).</description>
    <link>https://forem.com/julianchun</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3743909%2F59dab235-98f5-435f-9e44-4fbd9bf104b2.png</url>
      <title>Forem: julianchun</title>
      <link>https://forem.com/julianchun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/julianchun"/>
    <language>en</language>
    <item>
      <title>🤖 Copilot Telegram Bot: A Secure, Mobile-First Agent in Your Pocket</title>
      <dc:creator>julianchun</dc:creator>
      <pubDate>Sun, 15 Feb 2026 10:19:17 +0000</pubDate>
      <link>https://forem.com/julianchun/copilot-telegram-bot-a-secure-mobile-first-agent-in-your-pocket-5ah6</link>
      <guid>https://forem.com/julianchun/copilot-telegram-bot-a-secure-mobile-first-agent-in-your-pocket-5ah6</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-01-21"&gt;GitHub Copilot CLI Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;copilot-telegram-bot&lt;/strong&gt; - brings the power of GitHub Copilot to your smartphone. It transforms Telegram into a command center for your code, allowing you to architect, debug, and manage projects without ever opening a laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;I often get my best coding ideas when I'm away from my desk—on the subway, in a coffee shop, or taking a walk. By the time I get to my computer, the context is lost. I needed a way to interact with my codebase securely and intelligently from my phone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;I built a bridge between the Telegram Chat UI and GitHub Copilot CLI, &lt;strong&gt;powered by the &lt;code&gt;github-copilot-sdk&lt;/code&gt;&lt;/strong&gt;. This application embeds Copilot's agentic workflows, treating Telegram messages, taps, and image uploads as native context for the Copilot CLI.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌟 Core Capabilities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;⚙️ &lt;strong&gt;Dual Agent Modes:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plan Mode:&lt;/strong&gt; For brainstorming high-level architecture. It uses specialized prompts to act as a System Architect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edit Mode:&lt;/strong&gt; The classic "Hands-on" developer experience for writing code and running terminal commands.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;🔒 &lt;strong&gt;Sandboxed Workspace:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Project-First Workflow:&lt;/strong&gt; Upon startup, users must select a specific project folder from their configured &lt;code&gt;WORKSPACE_ROOT&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;This ensures the agent is strictly confined to the chosen project context and cannot access unauthorized files on the host machine.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;👁️ &lt;strong&gt;Total Observability:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real-time Tool Usage:&lt;/strong&gt; The bot displays every tool the agent uses (e.g., &lt;code&gt;view - index.html&lt;/code&gt;, &lt;code&gt;report_intent - Exploring codebase&lt;/code&gt;). You see exactly what the agent sees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cancel Anytime:&lt;/strong&gt; If the agent goes down a rabbit hole, a &lt;code&gt;/cancel&lt;/code&gt; command instantly kills the process, giving you full control over the session.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;🛡️ &lt;strong&gt;Human-in-the-Loop Security (The Permission Bridge):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;This is the core technical innovation. The bot intercepts "dangerous" tool calls from the SDK (like &lt;code&gt;bash&lt;/code&gt; or &lt;code&gt;create&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Instead of auto-executing, it renders a &lt;strong&gt;Telegram Inline Keyboard&lt;/strong&gt;. You tap "Allow" or "Deny" instantly. It brings enterprise-grade control to a chat interface.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;👀 &lt;strong&gt;Multimodal Vision:&lt;/strong&gt; Snap a photo of a whiteboard sketch or a UI mockup, send it to the chat, and watch Copilot convert pixels into boilerplate code.&lt;/li&gt;

&lt;li&gt;📊 &lt;strong&gt;Developer HUD:&lt;/strong&gt; Every response includes a "Heads-Up Display" footer showing your current Git branch, dirty state, active model, and cost multiplier.&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Available commands
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/start&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Open the main dashboard and project selector.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/help&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Show context-aware help with live status indicators.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/plan&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Toggle &lt;strong&gt;Plan Mode&lt;/strong&gt;. (Great for "How should I build X?").&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/edit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Switch back to &lt;strong&gt;Chat Mode&lt;/strong&gt;. (Implementation focus).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/model&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Swap the underlying LLM (e.g., &lt;code&gt;gpt-4.1&lt;/code&gt;). Shows billing multipliers. Reasoning effort picker for supported models.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/context&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Display model context and token usage info.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/usage&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Display detailed session metrics — per-model token breakdown, cost, quota snapshots.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/session&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Show session info and workspace summary.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/share&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Export full session to Markdown file.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/cancel&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cancel an in-progress request.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/clear&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reset conversation memory.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/ls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List files in current directory.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/cwd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Show current working directory.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Python 3.10+&lt;/code&gt;&lt;/strong&gt;: Fully async implementation with modern Python features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;github-copilot-sdk&lt;/code&gt;&lt;/strong&gt; (v0.1.23): The official SDK for Copilot CLI integration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;python-telegram-bot&lt;/code&gt;&lt;/strong&gt; (v20+): A robust async wrapper for the Telegram Bot API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;uv&lt;/code&gt;&lt;/strong&gt;: A fast and lightweight Python package manager.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;The following workflow highlights a typical session, demonstrating how the bot assists with planning, coding, and project management directly from Telegram:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start Message:&lt;/strong&gt; The bot greets the user and prompts for project selection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8151mtfs8vr5a7sc8mj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8151mtfs8vr5a7sc8mj.png" alt="Start message" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Greeting:&lt;/strong&gt; A quick connectivity test with the model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foocdwag1v8ernjzcntxk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foocdwag1v8ernjzcntxk.png" alt="Greeting" width="800" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plan Mode:&lt;/strong&gt; Switching to Plan Mode to brainstorm a game architecture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flvwitmwr5ga8pflbiv4s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flvwitmwr5ga8pflbiv4s.png" alt="Planning" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Edit Mode:&lt;/strong&gt; Switching back to Edit Mode to implement the plan.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxohvxtjrtts1e9pn1tl7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxohvxtjrtts1e9pn1tl7.png" alt="Implement" width="800" height="544"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Execute Commands:&lt;/strong&gt; Committing and pushing changes to GitHub via chat.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyv7e476jvx3h6dv0oc22.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyv7e476jvx3h6dv0oc22.png" alt="Version Control" width="800" height="801"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multimodal Uploads:&lt;/strong&gt; Uploading a UI sketch for analysis. Images are securely stored in a temporary session directory and auto-cleared upon session termination.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0qcuzydd2ezrer5sc6n4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0qcuzydd2ezrer5sc6n4.png" alt="Multimodal Vision" width="800" height="739"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;More Implementation:&lt;/strong&gt; I describe the desired feature in plain text. The agent analyzes the request, plans the changes, and implements the code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7663q6nzjnsm1jizi0t8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7663q6nzjnsm1jizi0t8.png" alt="Feature enhancement request" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Seamless Branching &amp;amp; Pushing:&lt;/strong&gt; Upon receiving user permission, the bot executes the git commands (branch creation, commit, push) and the session HUD updates instantly to reflect the new branch state.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2zas6371bqgse2hviw1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2zas6371bqgse2hviw1.png" alt="Feature enhancement process" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model Selection:&lt;/strong&gt; Swapping Copilot models and its reasoning effort via inline keyboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ggov6bpjc7lux510h2r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ggov6bpjc7lux510h2r.png" alt="Model Selection" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Permission Control:&lt;/strong&gt; Approving risky operations (Human-in-the-Loop).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxsgj33g8nyqsotj7clg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzxsgj33g8nyqsotj7clg.png" alt="Permission Control1" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsx9zlectop4jidz9qnnb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsx9zlectop4jidz9qnnb.png" alt="Permission Control2" width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interactive Options:&lt;/strong&gt; Replying to agent clarification requests via buttons.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftb2sacs2nvq3hn9bcde0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftb2sacs2nvq3hn9bcde0.png" alt="Ask User" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File Management:&lt;/strong&gt; Navigating the file system with &lt;code&gt;ls&lt;/code&gt; and &lt;code&gt;cwd&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fti0ax68w83qhzl8hwjcp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fti0ax68w83qhzl8hwjcp.png" alt="ls cwd" width="800" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session Management:&lt;/strong&gt; Managing active sessions via &lt;code&gt;/session&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqgz0doaxh6vugce6argy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqgz0doaxh6vugce6argy.png" alt="Session Info" width="800" height="822"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session Sharing:&lt;/strong&gt; Exporting the full chat history to Markdown via &lt;code&gt;/share&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyqar56o6n09tlsiahrkd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyqar56o6n09tlsiahrkd.png" alt="Session Share" width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Experience with GitHub Copilot CLI
&lt;/h2&gt;

&lt;p&gt;It was genuinely fun to work with the &lt;code&gt;github-copilot-sdk&lt;/code&gt; and get a "behind-the-scenes" look at how the Copilot CLI orchestrates agents. Building &lt;code&gt;copilot-telegram-bot&lt;/code&gt; was an exercise in deconstructing and reconstructing the Copilot CLI experience for mobile.&lt;/p&gt;

&lt;h3&gt;
  
  
  Workflow Philosophy &amp;amp; Mobile Optimization
&lt;/h3&gt;

&lt;p&gt;My experience with the Copilot CLI taught me that the "Plan before Execute" step is critical—verifying the agent's approach often saves hours of debugging later. I ported this workflow to the bot but quickly realized that standard CLI output is often too dense for a chat interface.&lt;/p&gt;

&lt;p&gt;To solve this, I engineered specific system prompts for &lt;strong&gt;both Plan and Edit modes&lt;/strong&gt;, injecting rules like &lt;code&gt;Response must be PLAIN TEXT&lt;/code&gt; and &lt;code&gt;Keep it scannable&lt;/code&gt; to force the model into brevity. This constrains the output to short, high-signal bullet points instead of verbose technical descriptions. Whether I'm reviewing an architectural plan or a debugging summary, the content remains readable on a phone screen while walking, maintaining the rigor of the CLI without the visual clutter of a terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Exploring the SDK
&lt;/h3&gt;

&lt;p&gt;I treated the Copilot CLI as a live reference implementation. Observing the raw event stream—watching how the agent decides to call tools, manage context, and handle state—was a fascinating experience in reverse-engineering. It felt like I was decoding the DNA of the CLI to rebuild it for a new platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  UX Design &amp;amp; Feature Philosophy
&lt;/h3&gt;

&lt;p&gt;I wanted to capture the &lt;em&gt;spirit&lt;/em&gt; of the Copilot CLI's command design—which prioritizes context, structure, and control—and translate it into a mobile-first experience. I cherry-picked features that I felt would best enhance the UX in a chat environment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Context Awareness &amp;amp; Control:&lt;/strong&gt; The CLI builds trust by showing you exactly what it's doing line-by-line. To replicate this "glass box" experience, I enforced a &lt;strong&gt;Project-First Workflow&lt;/strong&gt; (sandboxing the agent to a specific directory) and implemented &lt;strong&gt;Real-time Tool Usage Response&lt;/strong&gt;. The user sees every file the agent reads and every command it attempts as a stream of chat responses, with the ability to &lt;code&gt;/cancel&lt;/code&gt; immediately. This transparency, paired with the HUD footer (displaying active branch, dirty state, and model), ensures the developer maintains full situational awareness and control, just like in a terminal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mobile-First Interactions:&lt;/strong&gt; Actions like model selection (&lt;code&gt;/model&lt;/code&gt; with cost info) or permission approvals are converted into tap-friendly buttons to minimize typing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Context (Beyond Text):&lt;/strong&gt; The standard CLI is limited to text input, but development is often visual. I utilized Telegram's native media handling to enable &lt;strong&gt;Multimodal Support&lt;/strong&gt;. Users can upload images (like UI sketches or bug screenshots), which are sandboxed in a temporary server directory for the agent to analyze. This adds a visual dimension to the Copilot experience that a traditional terminal simply cannot offer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session Review:&lt;/strong&gt; Similar to reviewing terminal logs, the &lt;code&gt;/share&lt;/code&gt; command allows users to export the full session to Markdown, bridging the gap between quick mobile chats and deep desktop review.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Link
&lt;/h2&gt;

&lt;p&gt;Github Repository: &lt;a href="https://github.com/julianchun/copilot-telegram-bot" rel="noopener noreferrer"&gt;copilot-telegram-bot&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyd10poa9wmmzyq0gx7eq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyd10poa9wmmzyq0gx7eq.png" alt="Greeting" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
  </channel>
</rss>
