Frontmatter
| id | 8190 |
| title | Feat: Neural Link - Runtime Code Hot-Patching |
| state | Closed |
| labels | enhancementaiarchitecture |
| assignees | tobiu |
| createdAt | Dec 28, 2025, 10:26 PM |
| updatedAt | Jan 4, 2026, 1:49 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8190 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8169 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 4, 2026, 1:49 PM |
Feat: Neural Link - Runtime Code Hot-Patching
tobiu added parent issue #8169 on Dec 28, 2025, 10:26 PM
tobiu assigned to @tobiu on Jan 1, 2026, 11:44 PM

tobiu
Jan 4, 2026, 1:49 PM
Input from Gemini 3 pro:
✦ Implemented
patch_codecapability inRuntimeService.Key Implementation Details:
- Placement: The logic resides in
src/ai/client/RuntimeService.mjs(App Worker) rather thanNeo.worker.Appto maintain separation of concerns.- Security:
- The feature is strictly gated behind
Neo.config.enableHotPatching === true.- We used
new Function('return ' + source)()instead ofeval()ornew Function(body). This ensures that the patched code is created in the global scope and cannot accidentally capture local variables from thepatchCodemethod (scope isolation).- Protocol: The tool expects
sourceto be a full function expression string (e.g.,function(args) { ... }).- Audit: All hot-patch operations are logged to the console with
console.warn.
tobiu closed this issue on Jan 4, 2026, 1:49 PM
tobiu cross-referenced by #8309 on Jan 4, 2026, 1:54 PM
Context: To support true "Self-Healing" capabilities, agents need a mechanism to apply fixes to the running application without a full reload cycle.
Scope:
Enhance
RuntimeService:patchCode(sessionId, className, methodName, source).Neo.ns(className).prototype[methodName] = eval(...).Neo.config.enableHotPatchingflag (default false).Tools:
patch_code: Applies the fix.Goal: Enable sub-second self-healing loops for rapid iteration.