[Bug Report] ZCode Subagent 3GB+ RAM Memory Leak & profile.model Override Fallback
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Bug Summary & Technical Feedback
Community developer https://github.com/0Cymantek0 reported critical performance bugs and model resolution failures in the latest ZCode release:
1. 3GB+ RAM Memory Optimization Failure
Single subagents consume nearly 3GB+ RAM running basic non-intensive commands (e.g. grep searches) without build or compilation tasks.
2. Subagent Model Override Fallback Bug
- Subagents ignore configured subagent models (
profile.model) during child model resolution and fall back to the parent session default. builtInModelOverridesloads settings correctly, but ZCode fails to applyprofile.modelduring execution.- Model level aliases (
haiku,sonnet,opus) exposed to the orchestrator model all resolve to the parent session default.
3. Community Workaround Script
Oxygen authored a temporary patch script (Set-ZCodeSubagentModels.ps1 & subagent-models.json) to enforce explicit subagent model mappings (ocg/glm-5.2).
More information on the patch user applied:
https://discordapp.com/channels/1346756824233148527/1531925713517543554/1531930066865356971
Regards,
Roman M.
- Contributor / Ambassador at Z.ai
- The Vibe Coder's Blog on Telegram:
https://t.me/VibeCodePrompterSystem
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported memory use with a basic grep command and reviewing the community workaround files Set-ZCodeSubagentModels.ps1 and subagent-models.json. Trace how builtInModelOverrides and profile.model are resolved for child subagents; done means memory use is reduced and configured models, including haiku, sonnet, and opus aliases, no longer fall back to the parent default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- ai, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100