Summary
When Codex is used inside Zed with the zed-wakatime extension enabled, some emitted heartbeats arrive as low-context app events such as type=app, entity="Codex", with no project, branch, language, or explicit editor, which makes Waka-compatible backends classify them as unknown activity instead of attributing them to the active file or project.
Impact
This makes downstream analytics noisy and misleading for users who rely on Waka-compatible servers outside the hosted WakaTime backend. Instead of seeing file/project-level activity from Zed, they receive repeated generic Codex app heartbeats that cannot be grouped correctly by project, language, or editor.
Current Behavior
- Install Zed with the
zed-wakatime extension enabled.
- Use Codex from inside Zed.
- Inspect emitted heartbeats on a Waka-compatible backend.
- Some heartbeats arrive with payloads similar to:
{
"time": 1775101100,
"type": "app",
"branch": "",
"entity": "Codex",
"project": "",
"category": "ai coding",
"is_write": false,
"user_agent": "wakatime/v2.0.13 (darwin-24.6.0-arm64) go1.25.5 Zed/0.229.0+dev.27f70d2f56eb01f18b2a10131663c9fd4de4b37d Zed-wakatime/0.1.10 Codex/0.117.0"
}
Observed result:
project is empty
branch is empty
language is absent
editor is absent from the heartbeat body
entity is just Codex
Expected Behavior
When Codex activity is tracked through Zed, emitted heartbeats should preserve enough source context for Waka-compatible backends to attribute the activity meaningfully. At minimum, the emitted data should make it possible to identify the editor and, when applicable, the active file/project context rather than collapsing to a generic Codex app heartbeat.
Root Cause
Root cause not fully confirmed from the extension side yet, but the current emitted heartbeat shape appears to rely on downstream WakaTime-specific interpretation of user_agent / plugin metadata rather than sending explicit editor or file/project context in the heartbeat body.
Proposed Resolution
- Review how
zed-wakatime emits heartbeats for Codex-driven activity and identify why they fall back to generic type=app / entity="Codex" payloads.
- Ensure the extension includes sufficient explicit context in the emitted heartbeat body, especially
editor, and preserve file/project/language context whenever it exists in Zed.
- If generic app-level Codex heartbeats are intentional, document that behavior and clarify how non-WakaTime backends are expected to interpret them.
Test Plan
- Unit: add coverage for Codex-related heartbeat shaping so editor/context fields are asserted explicitly.
- Integration: verify heartbeats captured from Zed while using Codex against a Waka-compatible backend that stores raw payloads.
- Manual smoke:
- Enable
zed-wakatime, use Codex in Zed, and inspect the raw emitted heartbeat.
- Confirm that project/editor/language/file context is present when available.
- Commands:
cargo test
cargo fmt --check
Acceptance Criteria
Definition of Done
Summary
When Codex is used inside Zed with the
zed-wakatimeextension enabled, some emitted heartbeats arrive as low-context app events such astype=app,entity="Codex", with noproject,branch,language, or expliciteditor, which makes Waka-compatible backends classify them as unknown activity instead of attributing them to the active file or project.Impact
This makes downstream analytics noisy and misleading for users who rely on Waka-compatible servers outside the hosted WakaTime backend. Instead of seeing file/project-level activity from Zed, they receive repeated generic
Codexapp heartbeats that cannot be grouped correctly by project, language, or editor.Current Behavior
zed-wakatimeextension enabled.{ "time": 1775101100, "type": "app", "branch": "", "entity": "Codex", "project": "", "category": "ai coding", "is_write": false, "user_agent": "wakatime/v2.0.13 (darwin-24.6.0-arm64) go1.25.5 Zed/0.229.0+dev.27f70d2f56eb01f18b2a10131663c9fd4de4b37d Zed-wakatime/0.1.10 Codex/0.117.0" }Observed result:
projectis emptybranchis emptylanguageis absenteditoris absent from the heartbeat bodyentityis justCodexExpected Behavior
When Codex activity is tracked through Zed, emitted heartbeats should preserve enough source context for Waka-compatible backends to attribute the activity meaningfully. At minimum, the emitted data should make it possible to identify the editor and, when applicable, the active file/project context rather than collapsing to a generic
Codexapp heartbeat.Root Cause
Root cause not fully confirmed from the extension side yet, but the current emitted heartbeat shape appears to rely on downstream WakaTime-specific interpretation of
user_agent/ plugin metadata rather than sending explicit editor or file/project context in the heartbeat body.Proposed Resolution
zed-wakatimeemits heartbeats for Codex-driven activity and identify why they fall back to generictype=app/entity="Codex"payloads.editor, and preserve file/project/language context whenever it exists in Zed.Test Plan
zed-wakatime, use Codex in Zed, and inspect the raw emitted heartbeat.cargo testcargo fmt --checkAcceptance Criteria
zed-wakatimeno longer collapse to genericentity="Codex"payloads when richer editor/file/project context is available.user_agentparsing.Definition of Done