From 49894330d91c981e35be2002079442c8d0fe9836 Mon Sep 17 00:00:00 2001 From: Maddison Hellstrom Date: Fri, 24 Apr 2026 19:47:05 -0700 Subject: [PATCH 1/4] fix(build): add prettier to devDependencies (#23255) --- bun.lock | 1 + packages/opencode/package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/bun.lock b/bun.lock index d42183f938..47d1787067 100644 --- a/bun.lock +++ b/bun.lock @@ -451,6 +451,7 @@ "@typescript/native-preview": "catalog:", "drizzle-kit": "catalog:", "drizzle-orm": "catalog:", + "prettier": "3.6.2", "typescript": "catalog:", "vscode-languageserver-types": "3.17.5", "why-is-node-running": "3.2.2", diff --git a/packages/opencode/package.json b/packages/opencode/package.json index 14ae8b72ec..880459e968 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -69,6 +69,7 @@ "@typescript/native-preview": "catalog:", "drizzle-kit": "catalog:", "drizzle-orm": "catalog:", + "prettier": "3.6.2", "typescript": "catalog:", "vscode-languageserver-types": "3.17.5", "why-is-node-running": "3.2.2", From e29058c346e50976c6b5a2277f22d1902917e65c Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Sat, 25 Apr 2026 03:04:44 +0000 Subject: [PATCH 2/4] chore: update nix node_modules hashes --- nix/hashes.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/hashes.json b/nix/hashes.json index 07d53e889a..30a2bbfbd1 100644 --- a/nix/hashes.json +++ b/nix/hashes.json @@ -1,8 +1,8 @@ { "nodeModules": { - "x86_64-linux": "sha256-+G3/s18NZO1Dpc5TsZyix2Npodzei25Svw3nTjfzXW8=", - "aarch64-linux": "sha256-39HPencmRYRbyCk/cZIdPFk6ocY1AMlyuN9j25zAKzI=", - "aarch64-darwin": "sha256-043korPEjSHKiZ3P+EfWyOfKpgOC7CBpviccviaDa0o=", - "x86_64-darwin": "sha256-vsZ7e//rL9e7Cl5kl/Xplvi1fqayljxTLwRSbxvCxeM=" + "x86_64-linux": "sha256-V1Rt2k7ujkqGw4pDkn++WALTy1fAugvoKLhKvwFKkss=", + "aarch64-linux": "sha256-ho0AuGbJ1qw9Hvb3EbGC8f0lWqqgUslvda/wTe32MFo=", + "aarch64-darwin": "sha256-hdUyNmp+snwtnBckHXsPMgNFUYS1sYDdngkk+AXVqzc=", + "x86_64-darwin": "sha256-P57LpQNF8fplFKQBBIukhOKbIugbViyBUIUjClXohuk=" } } From f7d527cd28affbd68c18e11c36799d252d88df13 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Sat, 25 Apr 2026 00:47:36 -0400 Subject: [PATCH 3/4] ci: adjust auto close issue script to use not planned instead of completed (#24253) --- script/github/close-issues.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/github/close-issues.ts b/script/github/close-issues.ts index e8f0573ebb..9e1f597951 100755 --- a/script/github/close-issues.ts +++ b/script/github/close-issues.ts @@ -37,7 +37,7 @@ async function close(num: number) { const patch = await fetch(base, { method: "PATCH", headers, - body: JSON.stringify({ state: "closed", state_reason: "completed" }), + body: JSON.stringify({ state: "closed", state_reason: "not_planned" }), }) if (!patch.ok) throw new Error(`Failed to close #${num}: ${patch.status} ${patch.statusText}`) From 4877eccc0d06c747624bf61aaa6f3e65cea9cc8d Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Sat, 25 Apr 2026 01:14:52 -0400 Subject: [PATCH 4/4] Fix shell cwd after login startup (#24215) --- packages/opencode/src/session/prompt.ts | 12 ++++++---- packages/opencode/test/session/prompt.test.ts | 24 +++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts index 5f3530bcef..3d07a96ecd 100644 --- a/packages/opencode/src/session/prompt.ts +++ b/packages/opencode/src/session/prompt.ts @@ -787,6 +787,7 @@ NOTE: At any point in time through this workflow you should feel free to ask the const shellName = ( process.platform === "win32" ? path.win32.basename(sh, ".exe") : path.basename(sh) ).toLowerCase() + const cwd = ctx.directory const invocations: Record = { nu: { args: ["-c", input.command] }, fish: { args: ["-c", input.command] }, @@ -795,12 +796,13 @@ NOTE: At any point in time through this workflow you should feel free to ask the "-l", "-c", ` - __oc_cwd=$PWD [[ -f ~/.zshenv ]] && source ~/.zshenv >/dev/null 2>&1 || true [[ -f "\${ZDOTDIR:-$HOME}/.zshrc" ]] && source "\${ZDOTDIR:-$HOME}/.zshrc" >/dev/null 2>&1 || true - cd "$__oc_cwd" + cd -- "$1" eval ${JSON.stringify(input.command)} `, + "opencode", + cwd, ], }, bash: { @@ -808,12 +810,13 @@ NOTE: At any point in time through this workflow you should feel free to ask the "-l", "-c", ` - __oc_cwd=$PWD shopt -s expand_aliases [[ -f ~/.bashrc ]] && source ~/.bashrc >/dev/null 2>&1 || true - cd "$__oc_cwd" + cd -- "$1" eval ${JSON.stringify(input.command)} `, + "opencode", + cwd, ], }, cmd: { args: ["/c", input.command] }, @@ -823,7 +826,6 @@ NOTE: At any point in time through this workflow you should feel free to ask the } const args = (invocations[shellName] ?? invocations[""]).args - const cwd = ctx.directory const shellEnv = yield* plugin.trigger( "shell.env", { cwd, sessionID: input.sessionID, callID: part.callID }, diff --git a/packages/opencode/test/session/prompt.test.ts b/packages/opencode/test/session/prompt.test.ts index 8ffb20f154..911cb44155 100644 --- a/packages/opencode/test/session/prompt.test.ts +++ b/packages/opencode/test/session/prompt.test.ts @@ -1078,6 +1078,30 @@ unix("shell completes a fast command on the preferred shell", () => ), ) +unix("shell commands can change directory after startup", () => + provideTmpdirInstance( + (dir) => + Effect.gen(function* () { + const { prompt, run, chat } = yield* boot() + const parent = path.dirname(dir) + const result = yield* prompt.shell({ + sessionID: chat.id, + agent: "build", + command: "cd .. && pwd", + }) + + expect(result.info.role).toBe("assistant") + const tool = completedTool(result.parts) + if (!tool) return + + expect(tool.state.output).toContain(parent) + expect(tool.state.metadata.output).toContain(parent) + yield* run.assertNotBusy(chat.id) + }), + { git: true, config: cfg }, + ), +) + unix("shell lists files from the project directory", () => provideTmpdirInstance( (dir) =>