Skip to content

Refactor: Replace background tools with scoped resource trackers #305

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
bhouston opened this issue Mar 18, 2025 · 2 comments · Fixed by #306
Closed

Refactor: Replace background tools with scoped resource trackers #305

bhouston opened this issue Mar 18, 2025 · 2 comments · Fixed by #306
Labels

Comments

@bhouston
Copy link
Member

Refactor: Replace background tools with scoped resource trackers

Description

This refactoring removes the global background tools approach and replaces it with individual resource trackers (AgentTracker, ShellTracker, and BrowserTracker) that are scoped to each agent instance. This improves encapsulation and resource management by ensuring that each agent is responsible for its own resources.

Changes

  • Remove backgroundTools.ts and related files
  • Refactor individual resource trackers to be scoped to the agent rather than global
  • Update AgentTracker, ShellTracker, and BrowserTracker to include owner agent ID
  • Add cleanup methods to each tracker to properly terminate resources
  • Remove listBackgroundTools in favor of individual resource listing tools
  • Update tool implementations to use the new trackers

Benefits

  • Better resource isolation and management
  • Clearer ownership of resources (shells, browsers, sub-agents)
  • Improved cleanup process when agents terminate
  • More maintainable and modular code structure
Copy link

🎉 This issue has been resolved in version mycoder-agent-v1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version mycoder-v1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant