Codex Phone

Private Android notifications when Codex finishes a turn in VS Code. Linux desktop,
KDE Connect, no additional cloud service, no telemetry, and no conversation
contents sent to your phone. Independent project, not affiliated with OpenAI or KDE.
0.3.2 is the first Marketplace release candidate. Version 0.3.0 passed a manual
Linux/Android installation checklist; 0.3.2 adds automatic hook cleanup on uninstall.
Requirements
- Desktop Linux, VS Code 1.90 or later and the official Codex extension with hooks support.
- Python 3 and KDE Connect CLI on the same machine as Codex.
- KDE Connect on Android, notification permission and the Ping plugin enabled.
- Both devices on a reachable local network. Guest Wi-Fi/client isolation can prevent discovery.
The dashboard can offer an installation command for Debian/Ubuntu, Fedora, Arch
and openSUSE. It runs in an integrated terminal only after explicit confirmation.
You may install manually instead:
| Distribution |
Command |
| Debian / Ubuntu |
sudo apt install kdeconnect python3 |
| Fedora |
sudo dnf install kde-connect python3 |
| Arch |
sudo pacman -S kdeconnect python |
| openSUSE |
sudo zypper install kdeconnect-kde python3 |
Android: KDE Connect on F-Droid.
No Node.js or npm is required by end users.
Build and install locally
Use Node.js 22 LTS or a newer supported LTS, npm, Python 3 and Git:
git clone https://github.com/ossacolsale/codexphone.git
cd codexphone
npm install
npm test
npm run package:vsix
code --install-extension ./codex-kde-connect-notify-0.3.2.vsix
Alternatively install the VSIX from Extensions > ... > Install from VSIX.
The Marketplace publisher ID is GiancarloMangiagli. Earlier local previews
used local-preview; disable and uninstall the preview before installing this version.
A DEP0169 warning from the VS Code CLI may be unrelated to this extension;
this extension does not call url.parse and has no runtime npm dependencies.
First setup
- Open Codex Phone in the Activity Bar.
- Check dependencies and open KDE Connect on the phone. Click Refresh if needed.
- Pair the phone if necessary (accept the request on Android).
- Click Use device, then confirm the installation of the bundled helper and Stop hook.
- Click Send test notification. KDE Connect acceptance is not an Android delivery receipt.
- Approve the Stop hook in Codex (Hooks settings or /hooks where available)
and start a new Codex session. A registered hook is not necessarily an approved hook.
- Complete a short Codex turn and check the phone.
If you update from 0.2.1, use Update helper on the selected phone to install
the new bundled helper, preserving your selection and deduplication database.
No previous standalone script is required. If an exact legacy standalone hook
is detected, the extension offers to replace it after explicit consent.
Uninstall / testing from scratch
Uninstall Codex Phone from the Extensions view or use:
code --uninstall-extension GiancarloMangiagli.codex-kde-connect-notify
Close all VS Code windows and start VS Code again. VS Code runs the official
vscode:uninstall lifecycle script when the extension is fully uninstalled.
It removes only the exact Codex Phone Stop command from hooks.json and keeps a
backup of the previous contents. Restart Codex sessions to reload their hooks.
Other hooks, device pairing, and the local helper, device ID and deduplication
database are preserved. No notifications should be triggered by new Codex
sessions once the hook has been removed.
For immediate removal, use Disable Codex notifications in the dashboard
before uninstalling. For versions older than 0.3.2, this manual step is required.
The old local preview ID is local-preview.codex-kde-connect-notify.
The uninstall lifecycle script uses the same CODEX_HOME environment variable
as setup (default ~/.codex). If your setup used a custom CODEX_HOME, start and
restart VS Code with that same environment. Invalid JSON, symlinks and manually
edited commands are not removed automatically; inspect hooks.json if necessary.
For a clean slate, after hook removal and after closing all Codex and VS Code
sessions, move the remaining local state to a backup:
codex_home="${CODEX_HOME:-$HOME/.codex}"
if [ -d "$codex_home/kde-notify" ]; then
mv -- "$codex_home/kde-notify" "$codex_home/kde-notify.backup.$(date +%Y%m%d-%H%M%S)"
fi
Never delete the entire Codex directory or hooks.json.
Privacy and reliability
- The helper consumes Codex's hook event locally and uses only
hook_event_name, session_id and turn_id. It never logs, stores or forwards
prompts, answers, source code or project names.
- KDE Connect receives only the fixed text "Codex: task finished" or
"Codex: test notification". KDE Connect handles encrypted communication
with paired devices; no cloud relay is added by this extension.
- The extension writes
$CODEX_HOME/kde-notify/runner.py, device-id and
sent.sqlite3 (default home: ~/.codex). The database stores SHA-256 event
hashes and timestamps. Device selection remains local.
- The helper claims each event before attempting delivery. This is at-most-once:
offline or failed notifications are not replayed after reconnecting.
- Test pings check readiness before making one send attempt. They may be repeated manually.
- A Stop event signals a turn ending, not necessarily successful work.
Other Stop hooks may request continuation, so notifications can precede
the ultimate completion. The dashboard warns if other Stop hooks are present.
- The extension does not verify Codex hook approval. Remote SSH, containers,
WSL and other remote extension hosts are not supported in this release.
- Dependency installation and explicit documentation links may access the network;
notification handling itself does not use HTTP or remote APIs.
Troubleshooting
Use Show diagnostics in the dashboard. If devices are absent, open KDE Connect
on Android, verify the Wi-Fi network and firewall, and refresh. Check that Android
allows KDE Connect notifications and background activity. If manual test pings
arrive but Codex notifications do not, check approval of the Stop hook and start
a new Codex session. If the first test does not arrive even though KDE Connect
accepted it, retry manually and check Android's Ping plugin.
Development
npm test runs Node and Python unit tests without using real devices.
npm run package:vsix uses official VSCE. No custom packaging script is needed.
Before publishing, verify the current VSIX, the original logo in the dashboard and
Extensions view, and a first test ping on real hardware.
The project is MIT licensed.
Maintainer release process
Ordinary CI tests and packages on an ephemeral runner without uploading Actions
artifacts. The manually triggered Publish to Marketplace workflow on main
requires Microsoft Marketplace Trusted Publishing (OIDC), not a PAT. In the
publisher management page create a Trusted Publishing policy for owner
ossacolsale, repository codexphone, workflow publish.yml, environment blank.
Confirm that you own the publisher ID in package.json. After reviewing test
results and manually testing uninstall/restart, run the workflow on main.
It tests, packages, publishes the VSIX and attaches it to a GitHub Release. If
publication succeeds but release creation fails, recover the GitHub Release
separately rather than republishing an existing Marketplace version.