GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): pin @opencode/pty 0.6.0 and use protocol 9 by jlongster · Pull Request #64251 · anomalyco/opencode

fix(core): pin @opencode/pty 0.6.0 and use protocol 9 #64251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
jlongster merged 2 commits into dev from pty-reap-on-exit
Nov 17, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

fix(core): pin @opencode/pty 0.6.0 and use protocol 9 #64251

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
02355c9
fix(core): pin @opencode/pty 0.6.0 and retire protocol 8 daemons
jlongster Nov 16, 2026
12ab522
fix(core): drop the protocol 8 daemon sweep
jlongster Nov 17, 2026
File filter
Filter by extension


Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

24 changes: 12 additions & 12 deletions 24 bun.lock
Show comments
View file
Open in desktop

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

2 changes: 1 addition & 1 deletion 2 packages/cli/package.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@effect/platform-node": "catalog:",
"@opencode/client": "workspace:*",
"@opencode/plugin": "workspace:*",
"@opencode/pty": "0.5.2",
"@opencode/pty": "0.6.0",
"@opencode/schema": "workspace:*",
"@opencode/server": "workspace:*",
"@opencode/tui": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/core/package.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"@modelcontextprotocol/client": "2.4.0",
"@modelcontextprotocol/core": "2.4.0",
"@modelcontextprotocol/server": "2.4.0",
"@opencode/pty": "0.5.2",
"@opencode/pty": "0.6.0",
"@opencode/ai": "workspace:*",
"@opencode/codemode": "workspace:*",
"@opencode/plugin": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/core/src/persistent-pty/daemon.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from "node:path"
import { Cause, Data, Duration, Effect, Schema, Semaphore } from "effect"
import type { Handoff } from "@opencode/schema/persistent-pty"

const ProtocolVersion = 8
const ProtocolVersion = 9
const MaxFrameBytes = 8 * 1024 * 1024

const Lifecycle = Schema.Union([
Expand Down
10 changes: 1 addition & 9 deletions 10 packages/core/src/shell.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,7 @@ const daemonLayer = Layer.effect(
if (run.stopping) yield* Fiber.interrupt(run.stopping)
// Stop waiting first, so forgetting the process is not mistaken for losing it.
if (run.wait) yield* Fiber.interrupt(run.wait)
// Forget the process before deleting its file. This also kills what is left of its group, even after a
// successful exit, which a spawned command would leave running: the daemon cannot forget a process otherwise.
// Terminate a running command or just forget a finished one before deleting its file.
yield* pty.terminatePipe(run.process).pipe(Effect.ignore)
yield* Effect.promise(() => unlink(run.info.file).catch(() => {}))
yield* Deferred.fail(run.done, new NotFoundError({ id }))
Expand Down Expand Up @@ -431,13 +430,6 @@ const daemonLayer = Layer.effect(
),
),
),
// Like spawned commands: what a failed command left running in its group is stopped with it, while a
// successful one may leave background processes (`cmd &`) behind.
Effect.tap((outcome) =>
outcome.status === "exited" && outcome.exit !== undefined && outcome.exit !== 0
? pty.signalPipe(run.process, "SIGTERM").pipe(Effect.ignore)
: Effect.void,
),
Effect.flatMap((outcome) => finish(run, outcome)),
),
)
Expand Down
4 changes: 2 additions & 2 deletions 4 packages/core/test/fixture/persistent-pty-daemon.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import os from "node:os"
import path from "node:path"
import { Effect } from "effect"

export const pong = { type: "pong", instance_id: "test", pid: process.pid, protocol: 8, features: [] }
export const pong = { type: "pong", instance_id: "test", pid: process.pid, protocol: 9, features: [] }

export function temporaryDirectory() {
return Effect.acquireRelease(
Expand Down Expand Up @@ -105,7 +105,7 @@ export function frame(value: object) {
export function writeRegistration(directory: string, socket: string, instance = "test", token = "test") {
return writeFile(
path.join(directory, "service.json"),
JSON.stringify({ instance_id: instance, pid: process.pid, protocol: 8, socket, token, features: [] }),
JSON.stringify({ instance_id: instance, pid: process.pid, protocol: 9, socket, token, features: [] }),
)
}

Expand Down
2 changes: 1 addition & 1 deletion 2 packages/core/test/persistent-pty-daemon.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ it.live("rejects incompatible daemons without replacing or killing them", () =>
const optional = yield* Effect.flip(daemon.requestIfRunning({ op: "list" }))
expect(optional).toMatchObject({
kind: "protocol",
message: "opencode-pty protocol mismatch: daemon=7, client=8",
message: "opencode-pty protocol mismatch: daemon=7, client=9",
pid: existing.pid,
})

Expand Down
4 changes: 2 additions & 2 deletions 4 packages/core/test/shell-daemon.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ describe("Shell on the process daemon", () => {
}),
)

it.live("stops what a failed command left in its group, and leaves a successful one's", () =>
it.live("records successful and failed exits without signalling a finished command", () =>
Effect.gen(function* () {
const env = yield* daemonShells()
yield* env.withShell(env.directory, (shell) =>
Expand All @@ -262,7 +262,7 @@ describe("Shell on the process daemon", () => {
env.daemon.exit(2, 3)
expect(yield* shell.wait(failed.id)).toMatchObject({ status: "exited", exit: 3 })
expect(yield* shell.wait(succeeded.id)).toMatchObject({ status: "exited", exit: 0 })
expect(env.signals(2)).toEqual(["SIGTERM"])
expect(env.signals(2)).toEqual([])
expect(env.signals(1)).toEqual([])
}),
)
Expand Down
14 changes: 1 addition & 13 deletions 14 packages/core/test/tool-shell.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,6 @@ const call = (input: typeof ShellTool.Input.Type, id = "call-shell") => ({

const isWindows = process.platform === "win32"

// The process daemon keeps a finished command's zombie until the command is forgotten.
const running = (pid: number) => {
try {
process.kill(pid, 0)
} catch {
return false
}
return !Bun.spawnSync(["ps", "-o", "stat=", "-p", String(pid)])
.stdout.toString()
.trim()
.startsWith("Z")
}
const cwdCommand = isWindows ? "(Get-Location).Path; Start-Sleep -Milliseconds 100" : "pwd"
const helloCommand = isWindows ? "[Console]::Out.Write('hello'); Start-Sleep -Milliseconds 100" : "printf hello"
const stderrCommand = isWindows
Expand Down Expand Up @@ -2044,7 +2032,7 @@ describe("ShellTool", () => {
})
const pid = info.pid
if (pid === undefined) throw new Error("Expected shell PID")
expect(running(pid)).toBe(false)
expect(() => process.kill(pid, 0)).toThrow(expect.objectContaining({ code: "ESRCH" }))
}),
(info) =>
Effect.try(() => {
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/server/package.json
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"effect": "catalog:"
},
"devDependencies": {
"@opencode/pty": "0.5.2",
"@opencode/pty": "0.6.0",
"@opencode/client": "workspace:*",
"@opencode/plugin": "workspace:*",
"@tsconfig/bun": "catalog:",
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.