Repository navigation
Closed
Description
Description
Accumulating memory usage and multiple processes
Environment
- Plugin: v0.14.1
- Binary: 0.14.1
- OS: darwin arm64
- Node: v24.3.0
- OpenCode: 1.14.20
Configuration
Enabled flags from ~/.config/opencode/aft.json:
{
"experimental_search_index": true,
"experimental_semantic_search": true
}Diagnostics
- Timestamp: 2026-04-23T06:02:41.036Z
- OpenCode installed: true
- OpenCode config h plugin: true
- AFT config parse error: none
Config paths
{
"configDir": "~/.config/opencode",
"opencodeConfig": "~/.config/opencode/opencode.json",
"opencodeConfigFormat": "json",
"aftConfig": "~/.config/opencode/aft.json",
"aftConfigFormat": "json",
"tuiConfig": "~/.config/opencode/tui.json",
"tuiConfigFormat": "json"
}AFT flags
{
"experimental_search_index": true,
"experimental_semantic_search": true
}Plugin cache
{
"path": "~/.cache/opencode/packages/@cortexkit/aft-opencode@latest",
"cached": "0.13.1",
"latest": "0.14.1"
}Binary cache
{
"versions": [
"v0.13.1"
],
"activeVersion": null,
"totalSize": 26738688,
"path": "~/.cache/aft/bin"
}Storage
{
"path": "~/.local/share/opencode/storage/plugin/aft",
"exists": true,
"indexSize": 168462007,
"semanticSize": 184028500,
"backupsSize": 206555,
"urlCacheSize": 0,
"onnxruntimeSize": 70837200
}ONNX Runtime
{
"required": true,
"systemPath": null,
"cachedPath": "~/.local/share/opencode/storage/plugin/aft/onnxruntime/1.24.4",
"platform": "darwin-arm64",
"installHint": "Download from https://github.com/microsoft/onnxruntime/rele<USER>es"
}Log (lt 200 lines)
[2026-04-23T05:26:49.519Z] INFO [aft-plugin] [aft-plugin] added TUI plugin entry to ~/.config/opencode/tui.json
[2026-04-23T05:27:05.377Z] INFO [aft-plugin] Resolved binary: ~/.cache/aft/bin/v0.13.1/aft
[2026-04-23T05:27:05.379Z] INFO [aft-plugin] Config loaded from ~/.config/opencode/aft.json
[2026-04-23T05:27:05.379Z] INFO [aft-plugin] ONNX Runtime found at ~/.local/share/opencode/storage/plugin/aft/onnxruntime/1.24.4
[2026-04-23T05:27:05.383Z] INFO [aft-plugin] URL cache cleanup: removed 1 stale entries
[2026-04-23T05:27:05.601Z] INFO [aft-plugin] RPC server listening on 127.0.0.1:65335
[2026-04-23T05:27:06.686Z] INFO [aft-plugin] RPC call: get-announcement params={}
[2026-04-23T05:27:06.686Z] INFO [aft-plugin] RPC result: get-announcement => {"show":false}
[2026-04-23T05:27:06.688Z] INFO [aft-plugin] RPC call: get-warnings params={}
[2026-04-23T05:27:06.688Z] INFO [aft-plugin] RPC result: get-warnings => {"warnings":[]}
[2026-04-23T05:27:06.537Z] INFO [aft-plugin] Resolved binary: ~/.cache/aft/bin/v0.13.1/aft
[2026-04-23T05:27:06.540Z] INFO [aft-plugin] Config loaded from ~/.config/opencode/aft.json
[2026-04-23T05:27:06.540Z] INFO [aft-plugin] ONNX Runtime found at ~/.local/share/opencode/storage/plugin/aft/onnxruntime/1.24.4
[2026-04-23T05:27:09.488Z] INFO [aft-plugin] RPC server listening on 127.0.0.1:65346
[2026-04-23T05:27:10.470Z] INFO [aft-plugin] RPC call: get-announcement params={}
[2026-04-23T05:27:10.470Z] INFO [aft-plugin] RPC result: get-announcement => {"show":false}
[2026-04-23T05:27:10.480Z] INFO [aft-plugin] RPC call: get-warnings params={}
[2026-04-23T05:27:10.480Z] INFO [aft-plugin] RPC result: get-warnings => {"warnings":[]}
[2026-04-23T05:27:32.591Z] INFO [aft-plugin] RPC call: status params={"sessionID":"ses_2570b0c99ffe6FN2WS5BHprT5J"}
[2026-04-23T05:27:32.594Z] INFO [aft-plugin] Spawning binary: ~/.cache/aft/bin/v0.13.1/aft (cwd: ~/Desktop/PRISM)
[2026-04-23T05:27:32.628Z] INFO [aft-plugin] [aft] started, pid 28557
[2026-04-23T05:27:32.666Z] INFO [aft-plugin] [aft] watcher started: ~/Desktop/PRISM
[2026-04-23T05:27:32.667Z] INFO [aft-plugin] [aft] project root set: ~/Desktop/PRISM
[2026-04-23T05:27:32.667Z] INFO [aft-plugin] Binary version: 0.13.1
[2026-04-23T05:27:32.669Z] INFO [aft-plugin] RPC result: status => {"id":"3","success":true,"disk":{"semantic_disk_bytes":91102109,"storage_dir":"~/.local/share/opencode/storage/plugin/aft","trigram_disk_bytes":145137832},"features":{"experimental_search_inde
[2026-04-23T05:27:34.174Z] INFO [aft-plugin] RPC call: status params={"sessionID":"ses_2570b0c99ffe6FN2WS5BHprT5J"}
[2026-04-23T05:27:34.177Z] INFO [aft-plugin] RPC result: status => {"id":"4","success":true,"disk":{"semantic_disk_bytes":91102109,"storage_dir":"~/.local/share/opencode/storage/plugin/aft","trigram_disk_bytes":145137832},"features":{"experimental_search_inde
[2026-04-23T05:29:05.790Z] INFO [aft-plugin] [aft] [aft] pre-warmed symbol cache: 6404 files
[2026-04-23T05:30:03.015Z] INFO [aft-plugin] Spawning binary: ~/.cache/aft/bin/v0.13.1/aft (cwd: ~/Desktop/PRISM)
[2026-04-23T05:30:03.056Z] INFO [aft-plugin] [aft] started, pid 35150
[2026-04-23T05:30:03.131Z] INFO [aft-plugin] [aft] watcher started: ~/Desktop/PRISM
[2026-04-23T05:30:03.131Z] INFO [aft-plugin] [aft] project root set: ~/Desktop/PRISM
[2026-04-23T05:30:03.132Z] INFO [aft-plugin] Binary version: 0.13.1
[2026-04-23T05:30:03.456Z] INFO [aft-plugin] Spawning binary: ~/.cache/aft/bin/v0.13.1/aft (cwd: ~/Desktop/PRISM)
[2026-04-23T05:30:03.467Z] INFO [aft-plugin] [aft] started, pid 35202
[2026-04-23T05:30:03.509Z] INFO [aft-plugin] [aft] watcher started: ~/Desktop/PRISM
[2026-04-23T05:30:03.509Z] INFO [aft-plugin] [aft] project root set: ~/Desktop/PRISM
[2026-04-23T05:30:03.509Z] INFO [aft-plugin] Binary version: 0.13.1
[2026-04-23T05:30:13.423Z] INFO [aft-plugin] Spawning binary: ~/.cache/aft/bin/v0.13.1/aft (cwd: ~/Desktop/PRISM)
[2026-04-23T05:30:13.471Z] INFO [aft-plugin] [aft] started, pid 35370
[2026-04-23T05:30:13.513Z] INFO [aft-plugin] [aft] watcher started: ~/Desktop/PRISM
[2026-04-23T05:30:13.513Z] INFO [aft-plugin] [aft] project root set: ~/Desktop/PRISM
[2026-04-23T05:30:13.514Z] INFO [aft-plugin] Binary version: 0.13.1
[2026-04-23T05:34:48.115Z] INFO [aft-plugin] [aft] [aft] pre-warmed symbol cache: 6404 files
[2026-04-23T05:34:59.066Z] INFO [aft-plugin] [aft] [aft] pre-warmed symbol cache: 6404 files
[2026-04-23T05:35:09.458Z] INFO [aft-plugin] [aft] [aft] pre-warmed symbol cache: 6404 files
[2026-04-23T05:43:00.361Z] INFO [aft-plugin] Spawning binary: ~/.cache/aft/bin/v0.13.1/aft (cwd: ~/Desktop/minrlm)
[2026-04-23T05:43:00.377Z] INFO [aft-plugin] [aft] started, pid 44858
[2026-04-23T05:43:00.487Z] INFO [aft-plugin] [aft] watcher started: ~/Desktop/minrlm
[2026-04-23T05:43:00.487Z] INFO [aft-plugin] [aft] project root set: ~/Desktop/minrlm
[2026-04-23T05:43:00.489Z] INFO [aft-plugin] Binary version: 0.13.1
[2026-04-23T05:43:02.663Z] INFO [aft-plugin] [aft] [aft] pre-warmed symbol cache: 59 files
[2026-04-23T05:46:16.339Z] INFO [aft-plugin] [aft] [aft] built semantic index: 119 files, 805 entries
[2026-04-23T05:46:16.436Z] INFO [aft-plugin] [aft] [aft] semantic index persisted: 805 entries, 1781.6 KB
[2026-04-23T05:48:00.054Z] INFO [aft-plugin] Spawning binary: ~/.cache/aft/bin/v0.13.1/aft (cwd: ~/Desktop/PRISM)
[2026-04-23T05:48:00.153Z] INFO [aft-plugin] [aft] started, pid 48062
[2026-04-23T05:48:00.342Z] INFO [aft-plugin] [aft] watcher started: ~/Desktop/PRISM
[2026-04-23T05:48:00.342Z] INFO [aft-plugin] [aft] project root set: ~/Desktop/PRISM
[2026-04-23T05:48:00.434Z] INFO [aft-plugin] Binary version: 0.13.1
[2026-04-23T05:50:21.482Z] INFO [aft-plugin] [aft] invalidated 8 files
[2026-04-23T05:53:36.918Z] INFO [aft-plugin] Spawning binary: ~/.cache/aft/bin/v0.13.1/aft (cwd: ~/Desktop/minrlm)
[2026-04-23T05:53:36.986Z] INFO [aft-plugin] [aft] started, pid 52369
[2026-04-23T05:53:37.259Z] INFO [aft-plugin] [aft] watcher started: ~/Desktop/minrlm
[2026-04-23T05:53:37.259Z] INFO [aft-plugin] [aft] project root set: ~/Desktop/minrlm
[2026-04-23T05:53:37.271Z] INFO [aft-plugin] Binary version: 0.13.1
[2026-04-23T05:53:38.069Z] INFO [aft-plugin] [aft] [aft] loaded semantic index from disk: 805 entries
[2026-04-23T05:53:38.070Z] INFO [aft-plugin] [aft] [aft] semantic index: 119 stale files, rebuilding
[2026-04-23T05:53:38.884Z] INFO [aft-plugin] [aft] [aft] pre-warmed symbol cache: 59 files
[2026-04-23T05:56:15.330Z] INFO [aft-plugin] [aft] invalidated 8 files
[2026-04-23T05:56:32.430Z] INFO [aft-plugin] [aft] [aft] built semantic index: 119 files, 805 entries
[2026-04-23T05:56:32.431Z] INFO [aft-plugin] [aft] [aft] semantic index persisted: 805 entries, 1781.6 KB
[2026-04-23T06:00:17.186Z] INFO [aft-plugin] [aft] format: ~/Desktop/PRISM/microservices/submodules/revero-curse/pkg/auditor/vm/decomp/v2/rawlift_frontend_facts.go (skipped: not_found)
[2026-04-23T06:01:29.908Z] INFO [aft-plugin] [aft] invalidated 1 files
[2026-04-23T06:01:30.060Z] INFO [aft-plugin] [aft] format: ~/Desktop/PRISM/microservices/submodules/revero-curse/pkg/auditor/vm/decomp/v2/v2_test.go (skipped: not_found)
[2026-04-23T06:01:40.801Z] INFO [aft-plugin] [aft] [aft] pre-warmed symbol cache: 6404 files
[2026-04-23T06:02:44.069Z] INFO [aft-plugin] [aft] invalidated 9 files
[2026-04-23T06:02:44.106Z] INFO [aft-plugin] [aft] format: ~/Desktop/PRISM/microservices/submodules/revero-curse/pkg/auditor/vm/decomp/v2/rawlift_frontend_facts.go (skipped: not_found)
Username and home paths have been stripped from this report.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ualtinok commentedon Apr 23, 2026
It seems you're still using 0.13.1, 0.14 should fix this issue already. We just released 0.15.
bunx --bun @cortexkit/aft doctor --forceualtinok commentedon Apr 23, 2026
Please let me know if you encounter this on new version 0.15 (doctor will show you if you're on new version or not)
zedd3v commentedon Apr 23, 2026
Its better on 0.15, but memory is still high at 3-4gbs. My mac fans are almost never used. Once aft opens, they instantly spin up.
ualtinok commentedon Apr 23, 2026
It should be normally for a short time per project once its first scan and cache the folder? Does it always use high cpu? We can reduce the ram but that will also mean less files are cached.
ualtinok commentedon Apr 24, 2026
Found an extra issue of reindexing whole project unnecessarily. Will be fixed in next version
zedd3v commentedon Apr 24, 2026
Yes, still heavy
ualtinok commentedon Apr 24, 2026
Several contributing factors are addressed by v0.15.3 — and based on your logs (cached plugin 0.13.1) you're also missing everything in 0.14.x:
1. Per-session bridges → per-project bridges (v0.14.0)
The logs show 4 aft processes spawning for the same directory in ~10 seconds (pids 35150, 35202, 35370, 35402 at 05:30). Pre-0.14.0 the bridge pool keyed by
sessionID, so every concurrent OpenCode chat in the same project spun up its own aft process (each with its own ONNX runtime, symbol cache, LSP servers). v0.14.0 changed the pool to key by project directory — project-global heavy state (indexes, LSP) shared across sessions, only undo/checkpoint state kept session-private.2. Semantic index rebuilt on every restart (v0.15.2)
On APFS/ext4-with-nsec/NTFS, the old on-disk format lost subsecond mtime precision, so ~99% of files showed "stale" on every restart and got re-embedded. That's a 30-50s ~800% CPU spike every time you open OpenCode, and during the rebuild fastembed holds the ONNX model plus the full batch in memory. v0.15.2 introduces a V3 format with
secs + subsec_nanos; your existing V2 cache will trigger one last rebuild on upgrade, persist as V3, and stabilise forever. I see the exact pattern in your log (119 stale files, rebuilding).3. Sort panic in grep/glob (v0.15.3)
Three sort comparators called
fs::metadata(path)insideslice::sort_by()— non-deterministic, Rust panics on detection with "user-provided comparison function does not correctly implement a total order". In a repo with ~6400 files and active file-watcher activity, this could crash the aft process (and lose warmed state, forcing a cold respawn on the next call — which itself contributes to the "multiple processes" symptom).4. Call-graph ops walked all project files (v0.15.1)
Before 0.15.1,
aft_navigate callers/trace_to/trace_data/impactwalked every source file to build a reverse index, which grew the resident set proportionally. 0.15.1 addedmax_callgraph_files(default 20000) that fails fast withproject_too_largeon oversized projects instead.Please upgrade to v0.15.3 —
bunx --bun @cortexkit/aft doctor --forceor just restart OpenCode (the plugin auto-downloads the new binary). The one-time semantic rebuild on upgrade is expected (~30-50s), but after that your restarts should be dramatically lighter. If you still see accumulating memory after a fresh restart cycle, please reopen with the newdoctor --issuebundle and a fresh log tail — we'll dig into what's left.fix: address second council audit — 33 confirmed findings + Oracle fo…
fix(rust): honest move_file partial failure, surface bash_rewrite err…
fix(lsp,transaction,context): close 5 v0.18 council findings on LSP c…
test(plugins): real-bridge tool-layer e2e (#3, #4, #15, #16, #26)
fix(aft): report tri-state command completeness (#16)
fix(bash_background): v0.21.1 audit batch — IO+lock, GC, canonicaliza…
fix(e2e): real Windows timeout + poll-to-terminal + restore Docker ch…
tests: one shared re-ask harness for the nonblocking inspect deadline