LearnNewsExamplesServices
Frontmatter
titlefix(ai): emit Claude turn-presence beacons (#13498)
authorneo-gpt
stateMerged
createdAtJun 25, 2026, 2:25 AM
updatedAtJun 25, 2026, 2:37 AM
closedAtJun 25, 2026, 2:37 AM
mergedAtJun 25, 2026, 2:37 AM
branchesdevcodex/13498-turn-presence-emission
urlhttps://github.com/neomjs/neo/pull/13980
contentTrust
projected
quarantined0
signals[]
Merged
neo-gpt
neo-gpt commented on Jun 25, 2026, 2:25 AM

Resolves #13498

Adds the remaining narrow emission slice for who_is_online local mid-turn rescue: Claude Code now writes AGENT_TURN_PRESENCE on UserPromptSubmit and refreshes the active interval on PostToolUse, matching the documented Claude Code hook cadences: https://code.claude.com/docs/en/hooks. The Codex hook now reuses the same fail-soft SQLite writer and keeps its existing wake-submit nonce behavior. add_memory recency remains the primary liveness signal; this PR only supplies local corroboration data where a harness can emit it.

Evidence: L2 (static checks + temp-SQLite hook unit tests + Memory Core liveness consumer specs) -> L3 required for live harness rollout. Residual: post-merge, refresh the active Claude project settings from .claude/settings.template.json and verify a real Claude turn creates and refreshes an AGENT_TURN_PRESENCE row.

Deltas from ticket

The ticket title is broad, but prior work already shipped add-memory-recency primary, the who_is_online rescue read, and the health-gate exemption. This PR intentionally limits itself to the narrowed AC4 emission gap and does not alter liveness precedence or tenant scoping.

Test Evidence

  • node --check ai/mcp/server/memory-core/helpers/TurnPresenceHookWriter.mjs
  • node --check .claude/hooks/turnPresenceHook.mjs
  • node --check .codex/hooks/codex-context.mjs
  • node buildScripts/util/check-block-alignment.mjs .codex/hooks/codex-context.mjs .claude/hooks/turnPresenceHook.mjs ai/mcp/server/memory-core/helpers/TurnPresenceHookWriter.mjs test/playwright/unit/hooks/codexContextHook.spec.mjs
  • npm run test-unit -- test/playwright/unit/hooks/codexContextHook.spec.mjs — 4 passed
  • npm run test-unit -- test/playwright/unit/ai/services/memory-core/WakeSubscriptionService.spec.mjs test/playwright/unit/ai/services/memory-core/TurnPresenceService.spec.mjs — 77 passed
  • npm run agent-preflight -- .claude/hooks/turnPresenceHook.mjs .claude/settings.template.json .codex/hooks/codex-context.mjs ai/mcp/server/memory-core/helpers/TurnPresenceHookWriter.mjs test/playwright/unit/hooks/codexContextHook.spec.mjs

Post-Merge Validation

  • Refresh active Claude project settings from .claude/settings.template.json; start a real Claude turn, run at least one tool, and verify one active AGENT_TURN_PRESENCE row has source=claude-post-tool-use with lastProgressAt > startedAt.

Commits

  • 7d0d9cf807fix(ai): emit claude turn presence beacons (#13498)

Authored by Euclid (GPT-5, Codex Desktop). Session 019ef378-527d-7393-bc74-ec3a1d3f2ddf.

tobiu
tobiu APPROVED reviewed on Jun 25, 2026, 2:37 AM

No review body provided.