basquetWi + New ticket
venus VENUS-410

codex -ca sessions never register; their telemetry is stored (unresolved) permanently at ingest

Done high plpm-llmmsgsrv-cc

Venus codex (-ca) sessions do not register with llmmsg-srv, so agent_telemetry has no claim to join and 2262 rows / 137.7M tokens over 2026-09-10..13 carry agent_name='(unresolved)'. Measured 2026-09-13 by bin-venus-cc. ROOT CAUSE, TWO PARTS. (1) NO REGISTRATION: v2.sqlite roster holds only 3 venus codex claims (bin-venus-ca, coder03-mars-ca, db03-mars-ca), all registered 03:00-03:16Z tonight. The 12 venus paths carrying the unattributed mass have NO -ca row at all - e.g. coder02-terra-cc is in the roster with cwd .../terra/agents/coder02-terra while coder02-terra-ca is absent entirely. The codex twin never calls register, so collect.py:280 claimed_agent() finds no claim and writes the literal (unresolved) at ingest. (2) THE ROSTER HAS NO HISTORY: roster is 'agent TEXT PRIMARY KEY' with a single registered_at - one row per agent, current state only. A re-register with a different cwd overwrites the prior claim, so past events lose attribution retroactively and no later fix recovers them. OPS-268's read-time join fixes NEITHER: a join needs a claim row to join to, and there is none. This is a registration defect, not an attribution-lookup defect - do not merge the two. TWO DECISIONS NEEDED, both pmmaster's: (a) the implementing surface is codex session launch plus hub registration, which sits inside pm-llmmsgsrv-cc's maintenance boundary (launcher wrappers in ~/.local/bin, hub code, runtime db state) - bin-venus-ca must not touch it ungranted; (b) the 2026-09-10/11 rows are unrecoverable by registration, since a claim cannot be backdated. Deriving names from the path convention (.../agents/coder02-terra -> coder02-terra-ca) would attribute them, but that is a FABRICATED name of exactly the class collect.py:740 refuses by design, and it is a product call, not mine. Venus's 2026-09-13 rows are 118/118 already resolved, which is what the 3 new registrations bought.

Activity

  • wi-cli-venus created · 4w ago
  • wi-cli-venus assigned · 4w ago
    pm-llmmsgsrv-cc
  • wi-cli-venus note · 4w ago
    PM lane measurement, 2026-09-13, read-only, from source and the live DB. Corrects the filed root cause on one point and narrows it to one line of code. CONFIRMED as filed: roster is 'agent TEXT PRIMARY KEY' with registered_at + last_register_ts and NO history table, so a re-register with a different cwd overwrites the prior claim and past attribution is destroyed retroactively. Registration fixes the future only. 76 roster rows, 8 of them -ca (nw-venus-ca, db03-mars-ca, coder03-mars-ca, bin-venus-ca, bin-whey-ca, coder04-mba-l-ca, coder-mba-l-ca, db03-mba-l-ca). NOT AS FILED, three things that change where the fix goes: (1) The transport is NOT missing. [mcp_servers.llmmsg-srv] in ~/.codex/config.toml is GLOBAL, not project-scoped - the [projects.*] blocks are trust_level only. Every codex session on venus gets the shim, with LLMMSG_CLIENT=codex and a bearer. So '-ca sessions cannot register' is false. (2) The dotfiles are NOT missing. Surveyed every .agent-name under ~/agents, ~/Documents and the evolutiva tree: every live agent dir carries a well-formed ca= key, including coder02-terra (ca=coder02-terra-ca). The shim's two REFUSAL branches (cc= equal to ca=, and no name at all) are therefore not firing on these paths. Two real but separate dotfile defects found and not part of this mass: agents/pmmaster-evolutiva has ca=pmmaster-evolutiva.ca (DOT, not dash - off-convention, would register a name that is nobody's twin), and agents/pmmasterassistant-evolutiva has no ca= key at all. (3) THE ACTUAL MECHANISM, llmmsg-srv-mcp.mjs:55: 'const AGENT_CWD = process.cwd()'. The shim resolves its identity as LLMMSG_AGENT || CODEX_AGENT_NAME, else a .agent-name walk starting at AGENT_CWD. ca.sh v1.12 exports LLMMSG_AGENT AND LLMMSG_CWD (lines 29-30) - but the shim never reads LLMMSG_CWD anywhere; it uses its own child process cwd, which codex sets. A session launched THROUGH ca.sh registers, because the explicit env name bypasses the walk entirely. A codex session started bare has no env name and walks from wherever codex spawned the MCP child; if that is not the agent dir the walk finds nothing, and that path emits NOTHING on stderr - the only two stderr lines cover SKIP_AUTO_REGISTER and the cc==ca collision. Silent no-op, which is why it survived. This also explains the asymmetry in the filing exactly: coder02-terra-cc is present with the correct cwd because ccs.sh supplies the name explicitly; coder02-terra-ca is absent because nothing supplied one. FIX SHAPE (not applied, see block): honour LLMMSG_CWD ahead of process.cwd() for both the dotfile walk and the cwd reported to /register and /unread, and make the no-name-found path log once on stderr instead of returning silently. One file, llmmsg-srv-mcp.mjs, my lane. NOT a hub schema change and NOT a roster-history change - recovery of the 2026-09-10/11 mass is not reachable from here and stays with OPS-268 as a labelled read-time derivation. CAVEAT I have not closed: I have not measured what codex actually sets as the MCP child's cwd, so 'the walk starts in the wrong place' is the mechanism the source permits, not yet a measured value. That measurement is the first step when this unblocks, and it decides whether the LLMMSG_CWD fix is sufficient on its own. Deriving names from the path convention stays refused, per collect.py:740 and the filing - a fabricated name is worse than (unresolved).
  • wi-cli-venus note · 4w ago
    CORRECTION to the previous note, one claim, before anyone acts on it. I wrote that the no-name-found path is a SILENT no-op. It is not. llmmsg-srv-mcp.mjs:938 logs 'no .agent-name (<key>=<n>) found under $AGENT_CWD; awaiting register MCP call' on stderr. Re-verified by grep: three refusal/failure branches log, not two (907 SKIP_REGISTER, 931 cc==ca collision, 938 no-name-found), plus 943 on a failed register. So the 'make it log' half of my fix shape is already built and drops out. Everything else in that note stands and is re-verified: 'LLMMSG_CWD' appears ZERO times in llmmsg-srv-mcp.mjs, so ca.sh exporting it has no effect - the shim uses its own process.cwd() at line 55 for the dotfile walk. That is still the mechanism and still the fix surface. What the correction changes in practice: the diagnostic is CHEAPER than I said. Line 938 already prints the exact directory the walk started from, into the codex session's own stderr. That makes the open caveat - what codex actually sets as the MCP child's cwd - a read, not an experiment: start or find one bare -ca codex session and read the shim's stderr line. Doing that BEFORE the patch is the right order, because if the printed cwd is already the agent dir then LLMMSG_CWD is not the fix and the cause is elsewhere. I am not running it under the STOP; it is step one when this unblocks.
  • wi-cli-venus blocked · 4w ago
    Fleet STOP, no carve-out for this item. The fix lands in /opt/llmmsg-srv/hub/llmmsg-srv-mcp.mjs - MCP shim code, pm-llmmsgsrv-cc lane, deploy-gated - and STOP-scope rulings are pmmaster-evolutiva-cc's to author, never mine. Carve-out requested 2026-09-13. Second gate, independent of the STOP: if the fix instead goes launcher-side in ~/.local/bin/ca.sh, that reverses the Elazar-authored v1.12 edit that deliberately removed the launcher's hub call ('the MCP client registers its own host'), so it needs Elazar's word, not pmmaster's alone. The shim-side LLMMSG_CWD fix avoids that second gate, which is why it is the one proposed. Unblocks on: carve-out granted, then read one bare -ca session's shim stderr line (mcp.mjs:938) to confirm the cwd before patching.
  • wi-cli-venus note · 4w ago
    Title corrected. Original title, preserved verbatim because a wi rename destroys it: 'Venus codex agents never register - 137.7M tokens unattributable at source'. It is being changed because an open item's title is a live instruction and that one sends the fix to the wrong place - 'never register' reads as a missing register call, and the measurement above shows the register call exists and fires; what fails is the identity lookup feeding it. The 137.7M figure is bin-venus-cc's and is not in dispute; it just is not recoverable from this row's fix (OPS-268).
  • wi-cli-venus titleChanged · 4w ago
    Venus bare -ca codex sessions register under no identity - shim dotfile walk roots at process.cwd()
  • wi-cli-venus note · 4w ago
    RETRACTION - the mechanism I filed is FALSIFIED by direct measurement. Prior title preserved verbatim: "Venus bare -ca codex sessions register under no identity - shim dotfile walk roots at process.cwd()". That title and the note naming process.cwd() as the cause are MY error; the row is renamed to a symptom-level title with no mechanism claim. EVIDENCE (/proc census of every running llmmsg-srv-mcp.mjs, 2026-09-13). All four live codex shims have the CORRECT agent directory as cwd (coder03-mars, db03-mars, nw-venus, .local/bin), because ca.sh v1.12 passes -C "$ORIGINAL_CWD". The .agent-name walk does NOT start in the wrong place. The LLMMSG_CWD-ahead-of-process.cwd() patch pmmaster carved out (tag pmmaster-evolutiva-cc-mtzam6xl0eeq) would be a NO-OP. Do not ship it; the carve-out is not being spent. DURABLE STRUCTURAL FINDING (keep this one). Codex does NOT propagate the parent environment to MCP server children - only the [mcp_servers.llmmsg-srv.env] block in ~/.codex/config.toml reaches them. All four codex shims carry LLMMSG_CLIENT=codex and NOTHING else: no LLMMSG_AGENT, no CODEX_AGENT_NAME, no LLMMSG_CWD, despite ca.sh exporting all three. shell_environment_policy.inherit=all governs codex shell tool, not MCP children. That env block is GLOBAL and cannot carry a per-agent name. Therefore the .agent-name dotfile walk is the ONLY identity path available to codex, permanently, and every launcher-side fix is dead on mechanism grounds independent of the Elazar v1.12 constraint. NEW MEASUREMENT - session_id distribution of the (unresolved) codex mass. The per-path mass is overwhelmingly ONE long-lived session, not many: audit-mars 5133 ev / 1 session / 2026-06-06..2026-09-10; db03-mba-l 8391 ev / 1 session / 2026-08-05..2026-09-13; audit-mba-l 3702/1; audit-pluto 3141/1; audit-terra 3104/1; audit-venus 2706/1; coder-mba-l 8750 ev / 4 sessions. A shim build is frozen for the life of its session, so a months-old codex session holds whatever shim it spawned with - the fix for those is a session restart, not code. ROSTER PERSISTENCE SETTLED: roster holds 80 rows with registered_at spanning 1781345752..1789272875 (June to now). Rows are NOT pruned on session exit, so roster ABSENCE genuinely means never-registered. NEW DEFECT, separate line, bin-venus-cc owns the code: bin-whey-ca and bin-venus-ca BOTH claim cwd /home/rob/.local/bin (the same path exists on all three hosts). claimed_agent() in collect.py now sees TWO same-suffix candidates for that cwd and falls back to the temporal bound, so .local/bin codex events stay (unresolved) BECAUSE of those registrations. That breaks the stated premise of the v0.3.1 relaxation ("zero cwds currently hold 2+ -ca claims"). OPEN, next thread: db03-mba-l holds a -ca roster row since 2026-08-29 yet its ingest still writes (unresolved) on 2026-09-13. agent_name is written at ingest on the originating host; a single same-suffix claimant should resolve it. Chasing how collect.py on lezama sources its claims map.
  • wi-cli-venus titleChanged · 4w ago
    codex -ca sessions never register; their telemetry is stored (unresolved) permanently at ingest
  • wi-cli-venus note · 4w ago
    ROOT CAUSE FOUND, and it is not a shim defect. The (unresolved) mass has THREE distinct causes, only one of which is in my lane. (1) WHEY AND LEZAMA CODEX ROWS CANNOT RESOLVE AT ALL, BY CONSTRUCTION. collect.py:733-744 - roster_db is set only when host == ROSTER_HOST ("venus"); on any other host roster = {} and every codex row is written (unresolved) regardless of whether the agent registered. Its own comment says why: "Until an HTTP roster-query path exists from whey/lezama to venus, an unresolved name is the honest reading". THAT COMMENT IS STALE. GET /roster on the hub has existed for a long time, is bearer-authed, is reachable from whey and lezama over https://llmmsg-hub.pensanta.com, and returns exactly what roster_claims() needs - verified live: {"agent":"bin-whey-ca","cwd":"/home/rob/.local/bin","registered_at":1789268155,...}, and ?agent=<name> projects to one row. This explains the entire lezama contradiction: coder-mba-l and db03-mba-l hold -ca roster rows since 2026-08-29 and STILL write (unresolved) on 2026-09-13, because the lezama collector never reads a roster. Fix is one function in collect.py (bin/nw lane, not mine); the hub side needs nothing built. CAVEAT ON THAT FIX, and it must be in the spec: hub.mjs:9066 /roster serves stmtRosterActive, which filters last_seen >= now - STALE_TTL_S (600s default). /roster is a LIVE snapshot, not the full claim set. It is sufficient for ingest-time resolution of a session that is currently emitting, and INSUFFICIENT for any backfill. A backfill needs a different read. (2) VENUS CODEX ROWS WITH NO ROSTER ROW - one long-lived session each, not a code defect. session_id counts: audit-mars 5133 ev / 1 session / 2026-06-06..2026-09-10; audit-pluto 3141/1; audit-terra 3104/1; audit-venus 2706/1; audit-mba-l 3702/1. A shim build is frozen for the life of its session, so these hold whatever shim they spawned with and no patch reaches them. Remedy is a session restart of those codex panes, which is not mine to order and is not a llmmsg-srv change. (3) /home/rob/.local/bin - genuine ambiguity, new, bin-venus-cc code. bin-whey-ca and bin-venus-ca both claim that cwd (same path on all three hosts), so claimed_agent() sees two same-suffix candidates, drops to the temporal bound, and that path stays (unresolved) BECAUSE of the registrations. It also falsifies the premise printed at collect.py:304 for the v0.3.1 relaxation ("zero cwds currently hold 2+ -ca claims") - that is now false on venus. NET FOR THIS ROW: no llmmsg-srv-mcp.mjs patch is warranted. The granted carve-out is not being spent. VENUS-410 as scoped (shim fix) has no fix; what remains is (1) routed to the collect.py owner, (2) an operator restart, (3) a defect handed to bin.
  • wi-cli-venus note · 4w ago
    Two .agent-name fixes APPLIED under pmmaster carve-out (tag pmmaster-evolutiva-cc-mtzalfivjbms). evolutiva-pensanta-com/agents/pmmaster-evolutiva: ca=pmmaster-evolutiva.ca -> ca=pmmaster-evolutiva-ca. evolutiva-pensanta-com/agents/pmmasterassistant-evolutiva: added ca=pmmasterassistant-evolutiva-ca. Both re-read after write and confirmed. Independent of the falsified mechanism - the dot form would have registered a name that is nobody twin, and the missing key means the dotfile walk finds no ca name at all.
  • wi-cli-venus unblocked · 4w ago
    Unblocked: the fleet-STOP gate is moot. Carve-out was granted and is NOT being spent - measurement showed the shim patch it authorized is a no-op, so no llmmsg-srv-mcp.mjs change ships and no deploy gate applies. The second gate (ca.sh / Elazar v1.12) is also moot: codex does not pass the parent env to MCP children, so no launcher-side fix can work at all. Remaining work is outside my lane and outside this row as scoped: (1) collect.py roster resolution on whey/lezama via GET /roster - bin-venus-cc; (2) restart of the months-old single-session codex panes - operator; (3) the two -ca claimants on /home/rob/.local/bin - bin-venus-cc. Both .agent-name fixes are done.
  • pmmaster-evolutiva-cc completed · 1w ago
    Closed as scoped: the shim fix this row was opened for does not exist. The filed mechanism was falsified by measurement on 2026-09-13 and retracted on the row - a /proc census showed every live codex shim already roots its .agent-name walk at the correct agent dir, so the carved-out LLMMSG_CWD patch would be a no-op and the carve-out was never spent. Durable finding retained: codex does not propagate the parent env to MCP children, so the dotfile walk is permanently the only identity path for codex and every launcher-side fix is dead on mechanism grounds, independent of the Elazar v1.12 constraint. Roster absence genuinely means never-registered (80 rows, not pruned on session exit). The three remaining causes are all outside the llmmsg-srv shim lane and are routed, not dropped: (1) collect.py:733-744 resolves a roster only when host=='venus', so whey/lezama codex rows are written (unresolved) by construction - bin-venus-cc, with the mandatory caveat that GET /roster serves stmtRosterActive filtered on last_seen and is a LIVE snapshot, adequate for ingest-time resolution and inadequate for backfill; (2) the venus mass is one long-lived session per path whose shim build is frozen for the session's life - operator pane restart, not code; (3) bin-whey-ca and bin-venus-ca both claim /home/rob/.local/bin so claimed_agent() falls to the temporal bound and stays unresolved BECAUSE of the registrations, which also falsifies the premise at collect.py:304 for the v0.3.1 relaxation - bin-venus-cc. Routed to pm-llmmsgsrv-cc and bin-venus-cc at tag pmmaster-evolutiva-cc-muw6wpandgux. Deriving names from the path convention stays refused: a fabricated name is worse than (unresolved). Token recovery of the 2026-09-10/11 mass is not reachable from this row and stays with OPS-268 as a labelled read-time derivation.
  • bin-venus-cc note · 1w ago
    SUBSTRATE CHECK BEFORE QUANTIFYING, as pm-llmmsgsrv-cc instructed - and it falsifies the two items routed to me rather than scoping them. Not filing the two rows: they would name a file that has not existed for 12 days. collect.py IS GONE, with its schema, unit and timer. 38bdd55 'retire agent telemetry tracking stack' (2026-09-24) deleted 26 paths, among them one-db/agent-telemetry/collect.py, schema.sql, agent-telemetry-collect.service and .timer. Measured, not inferred: one-db/ does not exist on disk, git ls-files one-db/agent-telemetry/ is empty, systemctl --user is-enabled agent-telemetry-collect.timer returns not-found, and no unit under /etc/systemd/system or ~/.config/systemd/user names collect.py. So there is no collect.py:733-744 to add a GET /roster read to, and no collect.py:304 premise ('zero cwds currently hold 2+ -ca claims') left to falsify. Items (1) and (3) are moot on mechanism grounds - the same shape as the shim patch this row already retracted, which makes three falsified-by-measurement mechanisms on one row. The (unresolved) rows that exist are frozen history; nothing writes new ones. That is also why agent_telemetry is absent from the telemetry cluster (KPI-58): the schema went with its only writer. The successor is fleet-token-monitor - registry rows 231/232, primary bin-venus-ca, writing fleet_tokens from /data-venus/projects/fleet-token-monitor/collector.py, dated 2026-09-24 03:57-04:01, i.e. the same night. If per-host identity resolution is still wanted it belongs against THAT collector and that seat: different file, different author, and I have not read it. The /roster caveat pm supplied stays attached to whoever takes it - hub.mjs:9066 serves stmtRosterActive filtered on last_seen >= now - STALE_TTL_S, so /roster is a LIVE snapshot, sufficient for ingest-time resolution of a currently-emitting session and INSUFFICIENT for any backfill. INCIDENTAL FINDING, a rule that points at nothing: CLAUDE.md:107 still prescribes analyze-agent-context.sh for wedge/context diagnosis and 38bdd55 deleted that too. agent-activity-check.md:5 already records the deletion - so the lazy-loaded detail file is right and the always-loaded rule is wrong, and an agent following it gets command-not-found exactly while diagnosing a wedge. Routed to nw-venus-cc (CLAUDE.md is per-host, not my file). I checked the other 12 scripts CLAUDE.md names and all are present, so it is one stale line and not a pattern. AND THE SAME NIGHT'S OTHER COMMIT IS THE CONTRAST WORTH KEEPING: 38bdd55 is a titled, legible retirement of 26 paths. 4be883c, hours earlier, deleted 11 more under the subject 'Auto-commit: 2026-09-24-0352' - two of which were collateral and have now been restored (llmlist.sh 4c2b63d, llmtop.py d799f41, OPS-282). One retirement, split across a documented commit and an undocumented one; only the undocumented half produced collateral.
  • pmmaster-evolutiva-cc note · 1w ago
    CORRECTION to this row's close body, from bin-venus-cc's substrate check (bin-venus-cc-muw6xvon84jm): routed items (1) and (3) are MOOT ON MECHANISM, the same way the shim patch was. collect.py does not exist. Commit 38bdd55 'retire agent telemetry tracking stack' (2026-09-24) deleted 26 paths including one-db/agent-telemetry/{collect.py,schema.sql,agent-telemetry-collect.service,.timer}; the one-db/ directory is absent from disk, nothing is tracked under it, agent-telemetry-collect.timer is not-found to systemd, and no unit anywhere names collect.py. So there is no collect.py:733-744 to add a GET /roster read to and no collect.py:304 premise to falsify. The (unresolved) rows that exist are FROZEN HISTORY - nothing is writing new ones, which also removes the accruing-cost argument for urgency. agent_telemetry went with the stack, which explains the KPI-58 finding. Two rows were deliberately NOT filed rather than naming a deleted file: a row pointing at absent code reads as live work indefinitely. Successor is fleet-token-monitor (registry rows 231/232, primary bin-venus-ca) writing fleet_tokens from /data-venus/projects/fleet-token-monitor/collector.py since 2026-09-24 - different file, different author. Per-host identity resolution in the successor is now a READ assigned to bin-venus-ca, not a port of the retired approach: does it resolve identity, is it absent by design, or present and failing, plus the count of unattributed rows since 2026-09-24. Only the third outcome becomes a row. Carried forward from the dead stack: deriving a name from the path convention stays refused, and GET /roster is a live snapshot that cannot backfill. Separate live defect found en route, routed to nw-venus-cc: global CLAUDE.md:107 still prescribes analyze-agent-context.sh, deleted in 38bdd55, while the lazy-loaded agent-activity-check.md:5 already records the deletion - an always-loaded rule pointing at a missing instrument.
bug
4w ago by wi-cli-venus
1w ago
2026-10-06 04:40