Skip to content

About

Remote control for the coding agents on your computer: Claude Code, Codex, OpenCode and Antigravity from an Android phone or browser

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Telekumanda

DOI

Telekumanda is a remote control for the coding agents running on your computer: you start and follow Claude Code, Codex and Antigravity sessions from an Android phone or a browser, approve their tool calls, and pick up their results without sitting at the desk. The name is the old Turkish word for a TV remote. The repository contains two main parts:

  • A Kotlin / Jetpack Compose Android app in android/
  • A Node.js bridge server in bridge/

The Android app talks to the bridge over HTTP and WebSocket. The bridge runs on the PC, authenticates requests with a bearer token or per-device key, and connects the phone UI to Claude Code, Codex, Antigravity, MCP management, usage tracking, and OTA update delivery.

There is also a browser UI in web/ that the bridge itself serves at /ui — see "Web UI" below.

What It Does

The phone app provides a mobile control surface for multiple agent backends:

  • Claude Code CLI (Claude App)
  • Codex CLI (Codex App)
  • Antigravity CLI (agy acp, over the Agent Client Protocol)
  • Cowork Mode (multi-agent workspace coordination; a presentation layer that runs on top of the Claude App endpoints and can drive any provider)
  • Fleet Health Panel (real-time process monitoring & direct kill controls across all active backends)
  • Operations Inbox (persistent cross-provider started/waiting/completed/failed event history)
  • Project Center (persistent cwd-based project envelopes with sessions, outputs, changes, commands, and plans)

Alongside the agent backends, the app carries a two-sided file manager that browses both the PC and the phone; it is not an agent session.

Each backend is exposed through the same general chat-style UI: select or start a session, choose a model where supported, send prompts, stream responses, stop running work, inspect thought/details where available, and resume disk sessions when the backend supports it.

Important

Rule: Any commit or PR adding a new backend must update this README's backend list and endpoints before being merged.

Cowork Mode & Workspace Templates

Cowork mode allows you to run project-centric native provider sessions that coordination-wise target the same folder path. Workspaces live under Claude App's cowork root. Each workspace maintains its provider metadata under the .cowork/ folder, allowing Claude App, Codex App, and OMP (Oh My Pi) to resume their own native sessions without interfering with each other's transcripts.

Only Claude App's bridge session id is stable across restarts. The other two mint a fresh bridge uuid every time a shell is opened, so their records also carry the provider's own persistent id — Codex threadId, OMP's own session id (surfaced as diskId on the live session list). Resume and de-duplication key on that id, not on the bridge uuid; it lands in the record only after the first turn, via each backend's resolved-session callback.

  • A project-level writer lease prevents two providers from modifying the same workspace concurrently. Finished or abandoned leases are released automatically or expire safely.
  • The Devret action writes a bounded .cowork/handoff.md containing recent conversation context and current deliveries, opens the selected provider in the same workspace, and asks it to continue from that handoff.
  • Provider model lists and defaults come from the bridge's unified Cowork provider catalog, avoiding Android/bridge drift.
  • Drawer file operations target the explicitly selected workspace, while provider/model changes continue to target the active Cowork session workspace.

Workspace Templates

When creating a workspace, you can initialize it with a predefined structure template:

  • dava-dosyasi: Pre-structures belgeler/ and outputs/. Instructions enforce writing UDF task drafts to outputs/, conducting emsal/mevzuat research via connected MCP engines, and tracking case notes in notlar.md.

File Manager

A single file browser with two tabs — PC (over the bridge) and Phone (the device's own storage). Both sides support long-press multi-select with copy / move / delete, select-all, sorting by name, date or size, and a show/hide switch for dotfiles and hidden system entries.

Files open inside the app rather than handing off to another app:

  • Markdown, DOCX and UDF open in their own editors.
  • Images open in a viewer with pinch zoom, double-tap zoom and swipe between the images in the same folder. Ultra HDR photos are rendered through their gainmap where the panel supports it.
  • The list shows real thumbnails for images and PDFs in place of the file icon.
  • Coming back from any viewer keeps you in the folder you were in, while entering the browser fresh from the hub starts at its own root.

Notes

Notes live as plain Markdown files on the PC: a project note under <project>/notlar/, a standalone note under the cowork root's general-notes folder. Notes are text only.

New notes are created without a name prompt and open straight in the editor; the title is edited at the top and defaults to the first free not001, not002, …

Multiple Bridges

The app can hold several named bridge profiles (id, name, base URL, token) and switch between them from Settings → Connection.

Tabs are bound to the bridge that created them: sessions only exist on their own bridge, so after a switch the other bridge's tabs are hidden and no longer polled. Hidden tabs are not deleted — switching back restores them, and those sessions keep running meanwhile.

Notifications

The bridge sends no push notifications. Reminders are the only notifications: the app fetches the upcoming list (GET /reminders) and sets local alarms, and the bridge pushes the list over ADB when it changes so alarms are set even if the app is closed. Turn progress, approvals and results are followed in the app itself.

macOS

The mac/ folder holds a small AppKit + WKWebView wrapper that opens the bridge UI in a native window. Run mac/kur.sh to build and install it as /Applications/Telekumanda.app. The bridge address is read from the git-ignored mac/adres.local file, and the token is entered in the UI on first launch.

Android App

The Android app is built with Kotlin, Jetpack Compose, Material 3, OkHttp, and Markwon.

Current capabilities include:

  • Landing screen for choosing an agent backend
  • Bridge URL and token settings with connection test
  • Live chat UI with streamed messages
  • Markdown rendering for assistant output
  • Model, session, slash-command, and usage sheets
  • File attachment upload to the bridge
  • Two-sided file manager (PC over the bridge, phone storage locally)
  • In-app viewers/editors for Markdown, DOCX, UDF, and images
  • Stop controls for running backends
  • Disk session listing and adoption for supported CLI backends
  • MCP server management screen
  • Usage and quota displays for supported services
  • Foreground monitor service for bridge status
  • OTA update check, APK download, and install handoff

The Android package is:

com.agent.bridge

The current app version is defined in android/app/build.gradle.kts.

Bridge Server

The bridge is a Node.js server in bridge/server.mjs. It exposes REST endpoints and WebSocket streams for the Android app.

Main bridge responsibilities:

  • Authenticate phone requests with the token from bridge/config.json
  • Start and manage CLI-backed sessions for Claude, Codex and Antigravity
  • Stream conversation updates over WebSocket
  • List and resume disk sessions
  • Read selected workspace files for the phone UI
  • Upload attached files into backend context
  • Manage MCP server entries
  • Aggregate usage and quota data
  • Serve OTA update metadata and APK files

Important WebSocket channels:

/agy/stream
/claude-app/stream
/codex-app/stream

Important REST areas:

/health                             (vital signs / watchdog check)
/active-state                       (overall bridge status)
/operations                         (active operations and persistent event history)
/projects                           (persistent project envelopes and summaries)
/projects/detail                    (sessions, outputs, changes, commands, and plans for one project)
/projects/security/apply            (explicit per-project security profile application)
/projects/mcp/*                     (project MCP profile listing and explicit global apply)
/backends                           (versioned backend capability catalog and adapter conformance)
/pairing/*, /devices/*              (device pairing codes, per-device keys, key rotation)
/ui-pins                            (read/write starred selector entries, shared across devices)
/file                               (read workspace file content)
/download                           (download workspace file)
/dirs                               (browse directories and files; ?hidden=true reveals dotfiles)
/upload                             (write a file into a target folder; ?mkdir=true creates it)
/delete                             (delete workspace entries)
/rename                             (rename workspace entries)
/move                               (move workspace entries)
/usage                              (retrieve token & token quotas)
/slash                              (fetch command shortcuts per backend)
/cowork/*                           (projects, import, matters, session switching)
/cowork/notes, /cowork/note/*       (text notes, rename, attach, AI actions)
/agy/*                              (Antigravity ACP sessions, approvals, modes, thoughts)
/claude-app/*                       (Claude Code app workspaces, MCP, thoughts, quota suggest)
/codex-app/*                        (Codex app fork, compact, efforts, approve, rewind)
/update/*                           (delivery of OTA Android APK packages)

Requirements

The bridge is developed and run on Windows. It shells out to agent CLIs that must already be installed and logged in on the host machine:

  • Node.js 22 LTS — required, not optional (see "Running The Bridge")
  • Claude Code CLI (claude) — for the Claude App and Cowork backends
  • Codex CLI (codex) — for the Codex App backend
  • Antigravity CLI (agy.exe) — for the Antigravity backend (driven as agy acp)
  • JDK 17+ and the Android SDK — only to build the app

Backends whose CLI is missing simply fail when you start a session; the bridge itself still runs. Each CLI keeps its own credentials and config outside this repository (for example ~/.claude, ~/.codex, ~/.gemini), so a fresh machine needs those CLIs authenticated separately before the corresponding backend works.

Configuration

Device pairing

The legacy shared Bearer token remains supported for migration. In Android, Settings > Device security can create a single-use code valid for five minutes; the paired phone receives its own device key. Rotating that key immediately invalidates the previous one. The bridge stores only SHA-256 key digests and returns the clear key once, in the pairing or rotation response.

The same screen lists every paired device and can revoke one (POST /devices/revoke {deviceId}); revoking or rotating a key also closes that device's open streams at once. The Lite build no longer carries a token inside the APK: on first launch it asks for a pairing code like the full app. Wrong pairing codes are rate limited per address, and a burst of wrong codes from many addresses invalidates every open code.

Approvals are bound to the request they answer: clients send the pending request's requestId with /<backend>/approve, and the bridge answers 409 if a newer request has replaced it, so a stale notification cannot approve a different command. Only an explicit "allow": true approves.

The bridge reads its runtime configuration from bridge/config.json. This file is intentionally ignored by Git because it contains the auth token and local machine settings. Copy the template to create it:

copy bridge\config.example.json bridge\config.json

Then edit it and replace authToken with a long random string of your own. The bridge refuses to start if the token is shorter than 24 characters or still the template's CHANGE-ME… value. Settings:

  • host / port: bridge listen address (default 0.0.0.0:8787)
  • authToken: shared bearer token used by the phone
  • workspaceRoots: extra roots searched when a client asks for a file by name (optional). This is a search path, not an access boundary: the file API covers the whole Windows account the bridge runs as (see SECURITY.md). UNC and device paths (\\server\share, \\?\) and NTFS alternate data streams are rejected everywhere.
  • fileAliases: short name → absolute path shortcuts for /file (optional)
  • zcodePromptCap5h: 5-hour prompt cap used by usage display (optional)

Selector pins (starred entries)

Model and agent pickers are long, so the way to tame them is search plus stars — not a blacklist. The old hiddenModels / /model-visibility system was removed (27.08.2026): hiding a provider hid models the user later wanted, and every new provider needed a fresh blacklist entry.

Stars live on the bridge, not on the device: GET /ui-pins returns every scope, POST /ui-pins writes one scope ({scope, pinned}). Phone and tablet share a bridge, so they share their stars; two PCs running two bridges keep separate sets on purpose. Scope names come from the client (backend-model:<backendId>, backend-agent:<backendId>).

Conflicts resolve last-writer-wins — a toggle sends the scope's whole set and overwrites what the bridge had. Storage is bridge/ui-pins.json (gitignored), kept out of config.json because nothing here needs the secrets that file holds. On first connect a client whose bridge has no file yet uploads its local stars once; after that the bridge is the source and the local cache is replaced.

Optional environment variables:

  • AGENTBRIDGE_NODE: full path to the Node.js 22 executable used by bridge/run-bridge.cmd
  • AGENTBRIDGE_COWORK_ROOT: Cowork workspace root (default ~/CoworkSpaces)

The Android app stores the bridge URL, token, and cached usage data in local shared preferences.

Running The Bridge

From the bridge directory:

npm install
node server.mjs

The bridge requires Node.js 22 LTS: that is the runtime it is developed and tested on. (The original reason was node-pty, which left together with the PTY-driven Antigravity backend; the pin stays until a newer Node is verified.)

There is also a Windows supervisor script:

bridge\run-bridge.cmd

That script is intended for the local Windows setup and restarts the bridge if it exits. It uses AGENTBRIDGE_NODE when set; otherwise it expects node on PATH to be Node.js 22.

Logging Architecture

The bridge logging system separates normal runtime logging from early bootstrap errors:

  • bridge.log: The main logging target. Standard output redirection was replaced by a centralized Node-side logging controller (logger.mjs / log-rotation.mjs). All console logs, warnings, and errors are formatted with an ISO timestamp and severity level, then appended synchronously to this file. It automatically rotates and archives older files (e.g. bridge.log.1) based on file size constraints.
  • bootstrap.log: Used as a supervisor redirect target by run-bridge.cmd. It captures console outputs and errors before Node.js has initialized the bridge or logger (e.g. syntax errors, missing executables, or crash-on-start failures). It remains empty during normal operations.

Building The Android App

From the Android project directory:

cd android
.\gradlew assembleDebug

The debug APK is produced under:

android/app/build/outputs/apk/debug/

On first run, open Settings in the app and set the bridge URL and token to match your own machine. The URL compiled in as a default (DEFAULT_URL in RemoteUiState.kt) is a localhost placeholder (http://127.0.0.1:8787) and will not reach your PC from the phone — enter your machine's own address in Settings.

Web UI

web/ is a React + TypeScript client that the bridge serves itself at http://<bridge>/ui/. Same chat, sessions and controls on a keyboard-and-mouse layout, with no install and no update channel: rebuilding web/dist is enough, the bridge reads it from disk on every request.

It re-implements the bridge contract in TypeScript rather than sharing android/shared/ (that module is Kotlin). SessionStreamManager.kt and BridgeClientBackend.kt stay canonical — see web/README.md.

cd web
npm install
npm run build     # production: served by the bridge at /ui
npm run dev       # development: http://localhost:5173/ui/ , proxies to the bridge

Token flow: open /ui/#token=<bridge token> once; the part after # never reaches the server, and the token is stored in localStorage and stripped from the address bar. The bridge accepts tokens only in the Authorization header; because browsers cannot set headers on a WebSocket handshake, the web UI opens each stream with a single-use ticket valid for 30 seconds (POST /ws-ticket, bridge/ws-tickets.mjs).

The former Compose Desktop client (android/desktop/) was removed on 2026-08-10 — it had fallen far behind the phone app because every screen had to be written twice. Its jpackage/MSI packaging and the /update/desktop endpoints are gone with it.

Repository Layout

android/                 Gradle root for the Android clients
android/app/             Android app (Kotlin + Jetpack Compose)
android/shared/          Android-free Kotlin/JVM logic, shared and unit-tested
bridge/                  Node.js bridge and backend adapters
bridge/server.mjs        Main HTTP and WebSocket server, route definitions, SLASH commands
bridge/router.mjs        Route table and dispatch
bridge/routes/           Shared route groups (backend, general, mcp, update)
bridge/web-ui.mjs        Serves web/dist at /ui (before auth; see the note in that file)
web/                     Browser UI (React + TypeScript, built with Vite)
bridge/claude-app.mjs    Claude Code backend (+ claude-app-adapter.mjs)
bridge/codex-app.mjs     Codex backend (+ codex-app-adapter.mjs)
bridge/agy.mjs           Antigravity backend over ACP (+ acp-client.mjs transport)
bridge/acp-client.mjs    Generic Agent Client Protocol client (stdio JSON-RPC)
bridge/cowork.mjs        Cowork workspaces, leases, handoff
bridge/projects.mjs      Persistent project envelopes
bridge/operations.mjs    Cross-provider operations inbox
bridge/device-auth.mjs   Device pairing codes and per-device keys
bridge/mcp.mjs           MCP server registry management (+ per-backend *-mcp.mjs)
bridge/usage.mjs         Usage and quota aggregation
bridge/release.mjs       APK release script (version bump + gradle build)
bridge/config.example.json  Template for the git-ignored bridge/config.json
bridge/test/             Unit tests (node:test)
docs/                    Design notes, roadmaps, and phase instructions (Turkish)

Antigravity Backend — ACP (Agent Client Protocol)

bridge/agy.mjs drives agy acp: the Antigravity CLI's ACP server, speaking JSON-RPC 2.0 over stdio. This replaced a PTY-driven adapter on 08.11.2026 (the CLI used to offer no usable non-interactive mode). Measurements behind the current design are in docs/acp-gecis-notlari.md; the load-bearing ones:

  • Framing is line based. One JSON message per line, no Content-Length headers. bridge/acp-client.mjs is agent-agnostic and only does transport.
  • session/cancel is a NOTIFICATION, not a request. Sent as a request it never gets a reply and the caller waits forever (observed). Every ACP request in the client also carries a timeout for that class of mistake.
  • One child process per working directory. session/new takes a cwd, but the agent's tools resolve relative paths against the process cwd: a single child spawned in the home directory wrote deneme.txt into %USERPROFILE% while the session's cwd was elsewhere (observed). Children are therefore pooled by cwd; sessions in the same directory share one.
  • Turn end is the response, not a heuristic. session/prompt resolves with stopReason plus a usage block (input/output/cached/thought tokens). No transcript scraping, no idle-timeout guessing, no kill+respawn per turn.
  • Approvals come through the protocol. The agent sends a session/request_permission REQUEST and the turn blocks until it is answered. The bridge surfaces it as an approval card (awaitingApproval + approval) and POST /agy/respond (or /approve) resolves it. A permission request for an unknown session is denied rather than left hanging.
  • Sessions are protocol objects. session/list enumerates past conversations and session/load replays their history as notifications, so the old "scan the brain directory" code is gone. The session id we expose IS the ACP session id. Note: cwd in session/list output reflects the client's cwd, not where the session was created, so it is not trusted.
  • Event loop policy. The child and its stdio pipes are unref'd while idle (otherwise node --test took 100 s instead of 5 s) and ref'd again while a request is in flight (otherwise Node exits mid-request). Idle children are reaped after 5 minutes; an exit hook kills them so no orphan agy.exe is left.
  • Approval cards reuse the existing client contract. The bridge maps the ACP permission request onto the ApprovalInfo shape the phone and the web UI already parse (requestId / kind / tool / summary / description / options), so neither client needed agy-specific approval code.
  • registerBackend's /new route awaits newSession since 08.11.2026. It did not before: every other backend creates sessions synchronously, so a missing await was invisible until an async (ACP) backend arrived, where the route returned 400 for every session. bridge/test/agy-routes.test.mjs drives the registered routes in-process to keep that class of bug caught.
  • Not yet mapped. session/set_config_option (thinking level) rejects every parameter name tried so far; model and mode are set with session/set_model and session/set_mode, which work.

Notes

Telekumanda grew out of a personal automation project. Several backend adapters assume Windows, locally installed CLIs, browser/IDE profiles, and credentials already configured on the PC. The bridge should be treated as a trusted local service: it can read and write files and run agent CLIs with broad permissions, so do not expose it to the public internet. Bind it to a private network (the author runs it over Tailscale) and keep the auth token secret.

scripts/ ships only a few generic, machine-independent tools (masaustu.ps1, ocr.ps1, cdp.mjs, ui-olc.mjs). The author's personal helper scripts are git-ignored and are not part of the bridge or the app.

Names inside the code

Telekumanda was called AgentBridge until October 2026. Identifiers that live on users' devices keep the old name so that existing installs keep working and keep receiving OTA updates: the Android package com.agent.bridge, the data directory ~/.agentbridge, the AGENTBRIDGE_* environment variables and the browser storage keys that start with agentbridge.. Only user-facing text uses the new name.

Security

Telekumanda gives whoever holds a valid token the ability to run agent CLIs and read and write files on the host, so please report vulnerabilities privately as described in SECURITY.md rather than in a public issue.

License

Copyright (C) 2026 Alpaslan Fatih Sözer.

Telekumanda is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation. See LICENSE. The bundled Liberation fonts keep their own license (android/LIBERATION-FONTS-LICENSE.txt).

About

Remote control for the coding agents on your computer: Claude Code, Codex, OpenCode and Antigravity from an Android phone or browser

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages