feat: simplify agentic loop and fix critical bugs#17
Closed
randomm wants to merge 1 commit into
Closed
Conversation
This PR implements a major refactor and stability overhaul for the agentic loop. Completed Issues: - Fixes #5: Memory leak in fire-and-forget promises (implemented BackgroundTasks tracking) - Fixes #6: Split oversized prompt.ts (extracted session/tools.ts) - Fixes #7: Add BackgroundTasks test suite - Fixes #8: Fix silent tool failure in background (added result tracking and events) - Fixes #9: Add Stream module unit tests (comprehensive coverage) - Fixes #10: Fix race condition in Remory search (added request tracking) - Fixes #11: Fix unhandled abort during stream cleanup - Fixes #12: Implement check_task tool - Fixes #13: Add config schema validation - Fixes #14: Upgrade Remory to Unix socket (implemented in socket-client.ts) - Fixes #16: Fix code style violations Changes: - Extracted tool resolution logic to `src/session/tools.ts` - Implemented `BackgroundTasks` utility for promise tracking - Added `check_task` tool for polling background tasks - Upgraded Remory client to use Unix sockets and JSON-RPC - Added comprehensive tests for Stream and BackgroundTasks
Owner
Author
|
Closing - this PR's core contributions (tools.ts, socket-client.ts, check_task.ts, tasks.ts, stream tests) have been superseded by subsequent commits to dev branch. Multiple issues (#5, #11, #12) are already resolved. The branch has conflicts and is stale. Any remaining work from issues #13, #16 will be addressed in fresh PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR consolidates fixes for 11 issues related to stability, performance, and code quality in the agentic loop.
Key Changes
prompt.tsby extracting tool resolution logic totools.ts.StreamandBackgroundTasksmodules.check_tasktool and upgraded Remory integration to Unix sockets.Issues Closed
Closes #5, #6, #7, #8, #9, #10, #11, #12, #13, #14, #16