NEXO 7.13.5 — durable correction learning, LaunchAgent G5, and Codex shell enforcement

Published 2026-05-05. Corrective release over v7.13.3 — closes the remaining D.5, doctor, LaunchAgent, and Codex shell-enforcement and compliance debt without changing the Desktop installation contract.

D.5 correction learning is now durable

Correction detection on user messages now records an open requirement, opens protocol debt, and blocks nexo_task_close and session stop until a real nexo_learning_add resolves the correction. The daily self-audit path also creates followups for correction sessions that still lack a persisted learning.

Doctor repair is explicit

nexo doctor --fix now calls the orphan personal schedule metadata repair path directly before registry sync. Scripts with managed LaunchAgent schedules can regain their inline # nexo: metadata, while existing runtime and weekday schedule aliases continue to normalize before validation.

LaunchAgent G5 protects the intended boundary

Direct plist edits remain hard-blocked. Operational commands such as launchctl unload, launchctl bootout, rm, and mv over ~/Library/LaunchAgents/com.nexo.*.plist now create a warn-severity debt with the safe three-layer removal flow: unload the job, remove schedule markers from the source script, then verify with dry-run.

Codex shell calls are guarded before execution

Client sync now installs a managed ~/.codex/hooks.json PreToolUse handler for Bash, shell_command, and exec_command. The hook routes through the same Guardian pre-tool path as Claude Code for destructive shell commands, protected runtime surfaces, conditioned paths, and G5 LaunchAgent operations. installation_live.codex_protocol_compliance also fails if that live hook is missing or if 24h startup/bootstrap/heartbeat and transcript drift exceed five percent.

Validation

python3 -m pytest tests/test_correction_requirements.py tests/test_hook_guardrails.py tests/test_self_audit.py tests/test_doctor.py::TestRuntimeChecks tests/test_script_registry.py -q

198 passed, 3 xpassed

Full changelog entry → · src/tools_sessions.py · src/hook_guardrails.py · src/doctor/providers/runtime.py