Answer: To capture a heap snapshot, run `opencode debug heap-dump` (optionally with `--directory` to choose where it's written); in the desktop app, run Capture heap snapshots from the command palette. The text does not describe capturing CPU profiles. Status: Overdue (check was due 2026-11-20T13:37:34Z and has not succeeded) Entry: tool/opencode/troubleshooting/capture-heap-snapshot-profiles Revision: 1 Digest: sha256:7ca7405694136eda (changes whenever the content changes) Timeline: Created: 2026-11-13T03:58:20Z Last changed: 2026-11-13T03:58:20Z Last verified: 2026-11-19T13:37:34Z Next check: 2026-11-20T13:37:34Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of heap snapshot command | opencode debug heap-dump | [1] | 2026-11-19 custom directory option | --directory | [1] | 2026-11-19 desktop app method | Capture heap snapshots | [1] | 2026-11-19 example snapshot path | /home/me/.local/share/opencode/log/heap-48213-2026-10-23T013012345Z.heapsnapshot | [1] | 2026-11-19 Sources: [1] opencode. "Troubleshooting | OpenCode". https://opencode.ai/docs/troubleshooting/ Role: primary. Accessed: 2026-11-19T13:37:34Z Quote: "opencode debug heap-dump" (Supports: heap snapshot command) Quote: "Write it somewhere else with --directory ." (Supports: custom directory option) Quote: "Run Capture heap snapshots from the command palette." (Supports: desktop app method) Quote: "/home/me/.local/share/opencode/log/heap-48213-2026-10-23T013012345Z.heapsnapshot" (Supports: example snapshot path) Snapshot SHA-256: 85ba446ac5eebf200b39205d01942bf2de8291207d41e80db5840279bca1e233 (captured 2026-11-13T03:58:18Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:58:20Z, so the values verified then were kept. Cross-check: not-available at 2026-11-19T13:37:34Z. No independent second source is configured for this entry Last successful check: 2026-11-19T13:37:34Z Last attempt: 2026-11-19T13:37:34Z Notes and limitations: Extracted automatically from a single official source (section "Capture a heap snapshot"). Related: https://latestn.com/tool/opencode/troubleshooting/check-background-service-status How do I check the status of the opencode background service? https://latestn.com/tool/opencode/troubleshooting/loopback-no-proxy-requirement Why does opencode require loopback addresses in NO_PROXY when a proxy is configured? https://latestn.com/tool/opencode/troubleshooting/raycast-free-models-403 Why do free-tier chat models return HTTP 403 in Raycast with OpenCode? https://latestn.com/tool/opencode/settings/theme-mode How do I set the opencode theme mode to dark, light, or system? https://latestn.com/tool/opencode/settings/upgrade-from-integration-use How do I upgrade opencode policies from integration.use? https://latestn.com/tool/opencode/settings/warming-options How do I change the warming prompt, idle interval, or active window in opencode? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:58:20Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/troubleshooting/capture-heap-snapshot-profiles/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/troubleshooting/capture-heap-snapshot-profiles POST: https://latestn.com/dispute/tool/opencode/troubleshooting/capture-heap-snapshot-profiles with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/troubleshooting/capture-heap-snapshot-profiles?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I capture a heap snapshot or CPU and memory profiles in opencode? Revision 1, last verified 2026-11-19T13:37:34Z. https://latestn.com/tool/opencode/troubleshooting/capture-heap-snapshot-profiles (accessed 2026-11-21T09:57:39Z). @misc{LatestN_tool_opencode_troubleshooting_capture_heap_snapshot_profiles_r1, title = {How do I capture a heap snapshot or CPU and memory profiles in opencode?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/troubleshooting/capture-heap-snapshot-profiles}}, note = {Revision 1; digest sha256:7ca7405694136eda; last verified 2026-11-19T13:37:34Z; accessed 2026-11-21T09:57:39Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/troubleshooting/capture-heap-snapshot-profiles