Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
d7abbab
fix(bash): spool output to disk instead of in-memory capping
Mar 15, 2026
6143594
cap and throttle shell output streaming to reduce memory pressure
Mar 15, 2026
7c14868
fix(opencode): share and hard-close mcp clients across instances
Mar 15, 2026
fb80ad4
fix(serve): dispose instances and close MCP clients on shutdown
Mar 15, 2026
d47229a
feat(webui): add Recently Active dashboard with global session list
Mar 15, 2026
e1e0153
feat(webui): add Recently Active button to sidebar rail
Mar 15, 2026
fda6499
fix: restore local WUI recent sessions (#34)
Mar 17, 2026
42f54f7
feat(app): add browser voice controls (#44) (#45)
dzianisv Mar 18, 2026
c53b994
fix: finalize scoped upstream/dev picks (#46)
Mar 19, 2026
5df24c6
fix: restore local install flow (#46)
Mar 19, 2026
a279500
feat(tools): add rename tool for AI-driven session naming
Mar 15, 2026
1a56ac3
fix: restore scoped npm publish flow (#47)
dzianisv Mar 21, 2026
b7c984b
Improve session visibility and stabilize recent-session archiving (#48)
dzianisv Mar 23, 2026
700243c
feat(app): add auto-review flow and model preferences
Mar 23, 2026
21104bf
chore(git): ignore hidden dotfiles
Mar 23, 2026
92b46cb
feat(release): support scoped npm publish and desktop mic permissions…
dzianisv Mar 23, 2026
7a672e4
fix(app): wire settings context in prompt input
Mar 23, 2026
60f6c07
chore(git): ignore hidden dotfiles and remove tracked artifacts (#50)
dzianisv Mar 23, 2026
485da51
fix(app): add requestMicrophoneAccess to Platform type (#51)
dzianisv Mar 23, 2026
95293c7
fix(app): remove dead sending field and hardcoded review model default
Mar 23, 2026
fd634dd
revert: remove broad .* gitignore pattern to fix Windows e2e
Mar 23, 2026
3d41cc2
fix(app): preflight browser mic access for voice input (#52)
dzianisv Mar 24, 2026
1832545
Merge remote-tracking branch 'origin/main' into pr/auto-review-model-…
Mar 24, 2026
e205fb7
feat(app): add tree view for forked sessions in sidebar and recent pa…
dzianisv Mar 24, 2026
45054ea
include dialog-connect-provider changes from origin/main merge
Mar 24, 2026
2c15854
feat: add per-message speaker icon (#55)
dzianisv Mar 24, 2026
446e703
feat(app): add tree view indentation for sandbox worktrees (#56)
dzianisv Mar 24, 2026
6fe40f1
fix(app): only check last message for working status indicator (#57)
dzianisv Mar 24, 2026
ca8207e
fix(session): recover orphaned assistant messages on startup (#59)
dzianisv Mar 25, 2026
e277056
fix: restore local install on main (#19166) (#62)
dzianisv Mar 25, 2026
29a1714
feat: redesign recent sessions as pinned sidebar tab (#63)
dzianisv Mar 25, 2026
d8767ce
fix: restore repo-wide typecheck on main (#65)
dzianisv Mar 25, 2026
94f7509
use renderer theme mode to switch dark/light mode (#18851)
kommander Mar 23, 2026
66ac0af
Zen: adjust cache tokens
fwang Mar 24, 2026
94c7711
wip: zen
fwang Mar 24, 2026
17b25d7
chore: bump gitlab-ai-provider to 5.3.1 for GPT-5.4 model support (#1…
vglafirov Mar 24, 2026
fe63f91
chore: update nix node_modules hashes
opencode-agent[bot] Mar 24, 2026
42c37d3
sync
fwang Mar 24, 2026
32da01d
manually lock/unlock theme mode (#18905)
kommander Mar 24, 2026
d9c6baf
fix(app): stop terminal autofocus on shortcuts (#18931)
nexxeln Mar 24, 2026
51a05a0
fix(app): filter non-renderable part types from browser store (#18926)
BYK Mar 24, 2026
eff2d93
fix(app): use optional chaining for model.current() in ProviderIcon (…
BYK Mar 24, 2026
8dd12f2
fix(ui): eliminate N+1 reactive subscriptions in SessionTurn (#18924)
BYK Mar 24, 2026
1c84d3f
fix(app): startup efficiency (#18854)
adamdotdevin Mar 24, 2026
f580111
fix: restore cross-spawn behavior for effect child processes (#18798)
kitlangton Mar 24, 2026
c428813
fix: better nix hash detection (#18957)
gigamonster256 Mar 24, 2026
e86ae27
chore: update nix node_modules hashes
opencode-agent[bot] Mar 24, 2026
d96ebad
fix: update Feishu community links for zh locales (#18975)
MrMushrooooom Mar 24, 2026
1a79acf
fix: remove flaky cross-spawn spawner tests (#18977)
kitlangton Mar 24, 2026
431b8ec
chore: generate
opencode-agent[bot] Mar 24, 2026
213af6b
fix: nix hash update parsing (#18979)
gigamonster256 Mar 24, 2026
8d371ca
fix: route GitLab Duo Workflow system prompt via flowConfig (#18928)
vglafirov Mar 24, 2026
24a3e64
chore: update flake.lock (#18976)
gigamonster256 Mar 24, 2026
277a400
fix: improve plugin system robustness — agent/command resolution, asy…
ryanskidmore Mar 24, 2026
9f4a519
effectify Project service (#18808)
kitlangton Mar 24, 2026
ebb22aa
fix(app): sidebar truncation
adamdotdevin Mar 24, 2026
b67435f
chore: generate
opencode-agent[bot] Mar 24, 2026
4a96847
fix: nix hash update parsing... again (#18989)
gigamonster256 Mar 24, 2026
6911bdb
chore: effectify agent.ts (#18971)
rekram1-node Mar 24, 2026
bb5f4cd
fix(app): more startup efficiency (#18985)
adamdotdevin Mar 24, 2026
8b71459
fix(app): sidebar ux
adamdotdevin Mar 24, 2026
0fd50d6
chore: update nix node_modules hashes
opencode-agent[bot] Mar 24, 2026
e2f987e
feat(bedrock): Add token caching for any amazon-bedrock provider (#18…
ndhansen Mar 24, 2026
01a6c4d
chore: generate
opencode-agent[bot] Mar 24, 2026
c5cc564
fix(app): session timeline jumping on scroll (#18993)
adamdotdevin Mar 24, 2026
96fc003
feat: add Poe OAuth auth plugin (#18477)
kamilio Mar 24, 2026
108ecd7
fix(core): restore SIGHUP exit handler (#16057) (#18527)
thdxr Mar 24, 2026
29dd3e0
release: v1.3.1
Mar 24, 2026
5d32946
feat(webui): add Recently Active dashboard with global session list
Mar 15, 2026
e4a5fb9
fix: finalize scoped upstream/dev picks (#46)
Mar 19, 2026
6f7ddd7
fix: restore local install flow (#46)
Mar 19, 2026
6369013
chore(git): ignore hidden dotfiles and remove tracked artifacts (#50)
dzianisv Mar 23, 2026
d877011
feat(app): add tree view for forked sessions in sidebar and recent pa…
dzianisv Mar 24, 2026
529fa5a
fix: restore post-rebase verification state
Mar 26, 2026
3471599
docs: add fork notice to README (#66)
Mar 26, 2026
e045c05
fix: handle symlinked local install target
dzianisv Mar 27, 2026
bfb1466
fix: restore local serve recent sessions (#73)
dzianisv Mar 27, 2026
5a7511c
feat: add server-backed Edge TTS for voice output (#74)
dzianisv Mar 27, 2026
e48abac
fix: restore recent session context (#76)
Mar 28, 2026
67f7b9f
fix: restore memory diagnostics and cap instance cache
Mar 28, 2026
80923da
fix(memory): reduce runtime retention and streaming churn
Mar 28, 2026
bf2f0ca
Merge pull request #82 from dzianisv/fix/memory-main-consolidated
dzianisv Mar 28, 2026
11b2b8c
fix: preserve serve instance refs and local mcp lifecycle
Mar 29, 2026
a009216
Merge pull request #87 from dzianisv/issue-84-serve-instance-lifetime
dzianisv Mar 29, 2026
e5d02d8
fix(project): discover existing git worktrees
Mar 29, 2026
6338e0b
Merge pull request #89 from dzianisv/issue-88-worktree-visibility
dzianisv Mar 29, 2026
562c5f5
fix: cap logs and memory snapshots (#90) (#92)
dzianisv Mar 29, 2026
c65fac2
fix: stabilize auto review workflow (#93)
dzianisv Mar 29, 2026
eb19821
fix(app): auto-show git workspaces (#42) (#94)
dzianisv Mar 29, 2026
6aa99bb
fix: restore local install flow
Mar 25, 2026
ecd5ac7
fix(provider): restore gpt-5.4 xhigh reasoning variants
Mar 29, 2026
4235e4f
fix(session): load legacy sessions in webapp lists (#97)
Mar 30, 2026
8fc0723
Merge pull request #98 from dzianisv/issue-97-webapp-session-sync
dzianisv Mar 30, 2026
eee91c3
fix(app): auto-open routed project from recent sessions (#101)
Mar 30, 2026
123b4f1
Merge pull request #102 from dzianisv/issue-101-auto-open-projects
dzianisv Mar 30, 2026
0a31413
fix: backfill azure gpt-5.3-codex model list
Mar 30, 2026
5e58aab
fix: type azure model backfill map
Mar 30, 2026
68d81c6
feat(app): surface recent models in picker (#19935) (#105)
dzianisv Mar 30, 2026
d29ac02
Merge pull request #107 from dzianisv/issue-106-azure-gpt53-codex
dzianisv Mar 30, 2026
075a0fb
feat(github): auto-build issue prompts for assigned/opened events (#108)
dzianisv Mar 30, 2026
e2fa8ee
docs: add community announcement post kit (#109)
dzianisv Mar 30, 2026
1eda92c
fix(provider): keep gpt chat/codex families separate (#110)
dzianisv Mar 31, 2026
17312ff
docs(agents): require upstream issue status updates (#112)
dzianisv Mar 31, 2026
63fa83a
feat: add config-backed auto-review model selection
Mar 31, 2026
3556983
feat(serve): auto-resume interrupted sessions on startup (#116) (#119)
dzianisv Mar 31, 2026
d95ff18
fix(memory): auto-truncate runtime artifacts (#115) (#118)
dzianisv Mar 31, 2026
1059349
fix(serve): resume aborted sessions on startup (#120)
Mar 31, 2026
c2829a6
Merge pull request #121 from dzianisv/fix/120-serve-autoresume-aborted
dzianisv Mar 31, 2026
ac5a249
fix: recover bot for Alice with PR-numbered session naming
Mar 31, 2026
082404f
Merge pull request #123 from dzianisv/feat/122-pr-session-rename-alice
dzianisv Mar 31, 2026
87fd743
fix: enforce PR naming rule in rename tool
Mar 31, 2026
d13d34f
Merge pull request #125 from dzianisv/feat/124-rename-tool-pr-format
dzianisv Mar 31, 2026
24b9637
fix(serve): scan resumable sessions by interruption evidence
Mar 31, 2026
48d5b75
test(serve): add deterministic autoresume integration coverage
Mar 31, 2026
37ee12e
new: add runtime model fallback on retry exhaustion
vaab Feb 2, 2026
964baf9
feat: support model array shorthand for fallback in agent config
Apr 1, 2026
3d626ca
feat(bun): cache and timeout registry info lookups
Apr 1, 2026
e4820fc
feat(tui): handle prompt.submit command in TUI event dispatcher
Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nix-hashes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
nix build ".#packages.${SYSTEM}.node_modules_updater" --no-link 2>&1 | tee "$BUILD_LOG" || true

# Extract hash from build log with portability
HASH="$(grep -oE 'sha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)"
HASH="$(nix run --inputs-from . nixpkgs#gnugrep -- -oP 'got:\s*\Ksha256-[A-Za-z0-9+/=]+' "$BUILD_LOG" | tail -n1 || true)"

if [ -z "$HASH" ]; then
echo "::error::Failed to compute hash for ${SYSTEM}"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ permissions:
jobs:
version:
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.repository == 'anomalyco/opencode'
if: contains(fromJSON('["anomalyco/opencode","VibeTechnologies/opencode","vibetechnologies/opencode","dzianisv/opencode"]'), github.repository)
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -50,7 +50,7 @@ jobs:

- name: Install OpenCode
if: inputs.bump || inputs.version
run: bun i -g opencode-ai
run: bun i -g @vibetechnologies/opencode || bun i -g opencode-ai

- id: version
run: |
Expand All @@ -70,7 +70,7 @@ jobs:
build-cli:
needs: version
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.repository == 'anomalyco/opencode'
if: contains(fromJSON('["anomalyco/opencode","VibeTechnologies/opencode","vibetechnologies/opencode","dzianisv/opencode"]'), github.repository)
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -443,5 +443,6 @@ jobs:
AUR_KEY: ${{ secrets.AUR_KEY }}
GITHUB_TOKEN: ${{ steps.committer.outputs.token }}
GH_REPO: ${{ needs.version.outputs.repo }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN || secrets.NODE_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: false
LATEST_YML_DIR: /tmp/latest-yml
86 changes: 27 additions & 59 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,48 @@ on:
issue_comment:
types: [created]

concurrency:
group: review-${{ github.repository }}-${{ github.event.issue.number }}
cancel-in-progress: true

jobs:
check-guidelines:
review:
if: |
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/review') &&
contains(fromJson('["OWNER","MEMBER"]'), github.event.comment.author_association)
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
id-token: write
contents: read
pull-requests: write
pull-requests: read
issues: read
timeout-minutes: 15
steps:
- name: Get PR number
id: pr-number
run: |
if [ "${{ github.event_name }}" = "pull_request_target" ]; then
echo "number=${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
else
echo "number=${{ github.event.issue.number }}" >> $GITHUB_OUTPUT
fi

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 1
persist-credentials: false

- uses: ./.github/actions/setup-bun

- name: Install opencode
run: curl -fsSL https://opencode.ai/install | bash

- name: Get PR details
id: pr-details
run: |
gh api /repos/${{ github.repository }}/pulls/${{ steps.pr-number.outputs.number }} > pr_data.json
echo "title=$(jq -r .title pr_data.json)" >> $GITHUB_OUTPUT
echo "sha=$(jq -r .head.sha pr_data.json)" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check PR guidelines compliance
- name: Review pull request
uses: anomalyco/opencode/github@latest
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENCODE_PERMISSION: '{ "bash": { "*": "deny", "gh*": "allow", "gh pr review*": "deny" } }'
PR_TITLE: ${{ steps.pr-details.outputs.title }}
run: |
PR_BODY=$(jq -r .body pr_data.json)
opencode run -m anthropic/claude-opus-4-5 "A new pull request has been created: '${PR_TITLE}'

<pr-number>
${{ steps.pr-number.outputs.number }}
</pr-number>

<pr-description>
$PR_BODY
</pr-description>

Please check all the code changes in this pull request against the style guide, also look for any bugs if they exist. Diffs are important but make sure you read the entire file to get proper context. Make it clear the suggestions are merely suggestions and the human can decide what to do

When critiquing code against the style guide, be sure that the code is ACTUALLY in violation, don't complain about else statements if they already use early returns there. You may complain about excessive nesting though, regardless of else statement usage.
When critiquing code style don't be a zealot, we don't like "let" statements but sometimes they are the simplest option, if someone does a bunch of nesting with let, they should consider using iife (see packages/opencode/src/util.iife.ts)
OPENCODE_PERMISSION: '{"bash":"deny","edit":"deny","task":"deny"}'
with:
model: github-copilot/gpt-5.4
variant: xhigh
prompt: |
Review this pull request.

Use the gh cli to create comments on the files for the violations. Try to leave the comment on the exact line number. If you have a suggested fix include it in a suggestion code block.
If you are writing suggested fixes, BE SURE THAT the change you are recommending is actually valid typescript, often I have seen missing closing "}" or other syntax errors.
Generally, write a comment instead of writing suggested change if you can help it.
Answer these questions:
1. Were these changes necessary?
2. Is the implementation complete and done in the most optimal way for this repository?
3. What, if anything, should still be improved in this branch or pull request?

Command MUST be like this.
\`\`\`
gh api \
--method POST \
-H \"Accept: application/vnd.github+json\" \
-H \"X-GitHub-Api-Version: 2022-11-28\" \
/repos/${{ github.repository }}/pulls/${{ steps.pr-number.outputs.number }}/comments \
-f 'body=[summary of issue]' -f 'commit_id=${{ steps.pr-details.outputs.sha }}' -f 'path=[path-to-file]' -F \"line=[line]\" -f 'side=RIGHT'
\`\`\`
Review the actual changed code, not just the PR body. Read the full changed files before judging them.
Focus on concrete bugs, regressions, missing tests, unnecessary complexity, and obvious maintainability issues in the changed code.
Be concise, direct, and specific. Keep this to a single final review response. Do not create inline review comments, do not make code changes, and do not use shell commands.

Only create comments for actual violations. If the code follows all guidelines, comment on the issue using gh cli: 'lgtm' AND NOTHING ELSE!!!!."
If nothing needs attention, say `LGTM` and briefly state why.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,34 @@ permissions:
contents: read

jobs:
serve-regression:
name: serve regression
runs-on: blacksmith-4vcpu-ubuntu-2404
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Bun
uses: ./.github/actions/setup-bun

- name: Configure git identity
run: |
git config --global user.email "bot@opencode.ai"
git config --global user.name "opencode"

- name: Run instance lifetime regression
working-directory: packages/opencode
run: bun test test/project/instance.test.ts -t 'holds refs until async work settles'

- name: Run detached prompt regression
working-directory: packages/opencode
run: bun test test/server/session-messages.test.ts -t 'prompt_async keeps an instance ref until detached work finishes'

unit:
name: unit (${{ matrix.settings.name }})
strategy:
Expand Down
16 changes: 4 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
.DS_Store
# Ignore all hidden files/dirs except .github/
.*
!.github/

node_modules
.worktrees
.sst
.env
.idea
.vscode
.codex
*~
playground
tmp
dist
ts-dist
.turbo
**/.serena
.serena/
/result
refs
Session.vim
/opencode.json
a.out
target
.scripts
.direnv/

# Local dev files
opencode-dev
Expand Down
35 changes: 35 additions & 0 deletions .status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Status

## TL;DR
- Continued the scoped `upstram/dev` branch for issue `#46`.
- Finished cherry-picking the requested fixes only: long shell output handling, MCP idle cleanup/shutdown, browser voice controls, and Recently Active / local recent-session behavior.
- Resolved the remaining voice-control conflicts and then fixed the follow-up integration bugs exposed by builds and e2e.

## What Was Done
- Cherry-picked and integrated these requested fixes onto `issue-46-scoped-picks`:
- `d7abbab2b` / `61435949d` — long shell tool memory-pressure fixes
- `7c1486835` / `fb80ad45c` — shared MCP clients + shutdown cleanup
- `42f54f76b` — browser voice controls
- `d47229a18` / `e1e015340` / `fda64994a` — Recently Active + local recent sessions
- Fixed merge fallout/backport drift after the picks:
- Restored the local install flow that old `main` had:
- root `bun run install:local` alias
- package-level `build:local` / `sign:local` / `copy:local` / `install:local` / `profile:memory` scripts
- `scripts/install-local.sh` and the `packages/opencode/script/*local*.ts` helpers
- restored the missing `Flag` import in `packages/opencode/src/mcp/index.ts`
- trimmed `packages/opencode/src/cli/cmd/serve.ts` back to the intended shutdown cleanup on `upstram/dev`
- made local sidebar sessions follow the active directory/worktree in `packages/app/src/pages/layout/sidebar-workspace.tsx`
- made sidebar hover-prefetch use the `preview` query path end-to-end by updating the session route contract and regenerating the JS SDK
- hardened e2e project seeding in `packages/app/e2e/actions.ts`

## Current Issue
- No known blocker right now.
- The scoped branch is building and the targeted tests are passing.

## Validation
- `bun install`
- `cd packages/opencode && bun run build`
- `cd packages/app && bun run build`
- `cd packages/opencode && bun test test/server/global-session-route.test.ts test/server/static-app.test.ts test/server/global-session-list.test.ts test/server/session-list.test.ts test/pty/pty-session.test.ts`
- `cd packages/app && bun test --preload ./happydom.ts ./src/utils/runtime-adapters.test.ts`
- `cd packages/app && bun run test:e2e:local -- e2e/prompt/prompt-voice.spec.ts e2e/sidebar/sidebar-recent-prefetch.spec.ts e2e/sidebar/sidebar-session-links.spec.ts`
32 changes: 32 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
- The default branch in this repo is `dev`.
- Local `main` ref may not exist; use `dev` or `origin/dev` for diffs.
- Prefer automation: execute requested actions without confirmation unless blocked by missing info or safety/irreversibility.
- App e2e note: `bun test:e2e` expects a backend at `127.0.0.1:4096`; use `bun test:e2e:local -- -- <spec>` when running tests in isolation.

## Devx

- If a task has an upstream issue (for example in `anomalyco/opencode`), keep that issue updated while working.
- When any commit/PR/merge relates to an upstream issue, add an upstream issue comment with:
- what changed
- commit SHA and PR link
- current status (in progress, merged, or blocked)
- Do not wait until the end of the task; post updates as soon as relevant commits or merges happen.

## Style Guide

Expand Down Expand Up @@ -123,6 +133,28 @@ const table = sqliteTable("session", {
- Test actual implementation, do not duplicate logic into tests
- Tests cannot run from repo root (guard: `do-not-run-tests-from-root`); run from package dirs like `packages/opencode`.

## Memory Panic Triage

If the user reports a panic, OOM, runaway RSS, or unexplained restarts, analyze memory artifacts before guessing.

1. Capture the current state.
Run the relevant package-scoped checks first, such as `bun run --cwd packages/opencode profile:memory:wait` for a waiting server or `bun run --cwd packages/opencode profile:memory:workload` for a synthetic reproduction.
2. Inspect the durable artifacts under `~/.local/share/opencode/log`.
Start with `dev.log`, the newest `memory-*.ndjson`, and the newest directories in `~/.local/share/opencode/log/memory/`.
3. Read the snapshot files in order.
`sample.json` shows RSS, heap, PTY count, session counts, and instance-cache pressure.
`meta.json` shows why the snapshot was taken and the threshold or trigger state.
`ps.txt` shows child-process footprint.
On macOS, also inspect `vmmap.txt` and `sample.txt`.
4. Open `heap.heapsnapshot` only after you know the spike is heap-related.
Use Chrome DevTools Memory tooling to inspect retained objects and dominators.
5. Check disk pressure alongside memory pressure.
Inspect `~/.local/share/opencode/worktree`, `~/.local/share/opencode/tool-output`, and `~/.local/share/opencode/log` so you do not misdiagnose a disk-exhaustion crash as a heap leak.
6. Preserve evidence in the issue or PR.
Record exact sizes, timestamps, active session counts, and the snapshot trigger reason.

Do not generate repeated snapshots blindly. Retention keeps only the newest `2` heap snapshot directories, so if an older capture matters, attach or summarize it before reproducing again.

## Type Checking

- Always run `bun typecheck` from package directories (e.g., `packages/opencode`), never `tsc` directly.
Loading
Loading