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(cli): retry service file renames on Windows by Hona · Pull Request #59105 · anomalyco/opencode

Conversation

@Hona

@Hona Hona commented Oct 25, 2026 •
edited by opencode-agent Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Backport of the service file fixes in #57277 (Kit Langton) from beta.

Problem

  • Service config: every write staged <config>.tmp and renamed it over the config. Two CLI commands writing at once, such as two opencode service set calls, shared that temp file and could corrupt it.
  • Windows: a rename fails with EPERM while another process has the target open, for example a client reading service.json or a contender starting.

Change

  • Config write: stages <config>.<pid>.tmp, so concurrent writers never share a temp file, and retries the rename up to 20 times, 10 ms apart.
  • Registration write: already staged a per-service temp file; it now retries its rename the same way.
  • Test isolation: the service test clears OPENCODE_CONFIG_DIR, so a developer's own config cannot leak into it.

Who runs the service is still decided by the port bind alone; only the elected server writes service.json.

Testing

  • typecheck:tsc passes in cli.
  • cli/test/service.test.ts passes.

Added by the opencode bot (AI-generated).

Related: #56746

Sorry, something went wrong.

Uh oh!

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

All reactions
@kitlangton @Hona
fix(cli): retry service file renames on Windows
d5ae376
Backport of the service file fixes in #57277 from beta. Two CLI commands
writing the service config at once shared one temp file, and on Windows a
rename fails with EPERM while another process has the target open. The config
write now stages a per-process temp file, and both it and the registration
write retry the rename briefly.
Copilot AI balanced review requested due to automatic review settings October 25, 2026 23:46
@Hona
Hona enabled auto-merge (squash) October 25, 2026 23:46
Copilot AI reviewed Oct 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Sorry, something went wrong.

Uh oh!

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

All reactions
opencode-agent[bot]
opencode-agent Bot reviewed Oct 25, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is sound. On Linux I reproduced the shared <config>.tmp race on the base: with 12 concurrent opencode service set calls, one run failed with NotFound: FileSystem.rename (…service-local.json.tmp). With this PR, repeated runs gave no failures and left no temp files behind. I couldn't exercise the Windows EPERM retry path here. test/service.test.ts passes (28 pass, 1 skip) and typecheck:tsc passes in packages/cli.

The public API is unchanged.

No blocking concerns.

Related: #56746

Sorry, something went wrong.

Uh oh!

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

All reactions
@Hona
Hona merged commit f8af56d into dev Oct 25, 2026
15 checks passed

Uh oh!

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

@Hona
Hona deleted the backport-service-rename branch October 25, 2026 23:51
@amrkmn amrkmn mentioned this pull request Oct 27, 2026
opencode 2.2.0 amrkmn/homebrew-tap#1182
Closed
1 task
@github-actions github-actions Bot mentioned this pull request Oct 28, 2026
Tool release: OpenCode 2 v2.2.0 (was v2.1.4) agent-sh/agnix#1737
Closed
@kobzevvv kobzevvv mentioned this pull request Oct 29, 2026
chore(upstream): порт v2.2.1 — 71 в порт, 67 на решение gpt-mem/opencode-mem#219
Open
@neriousy neriousy mentioned this pull request Nov 19, 2026
test(core): fix Windows unit flakes in video, shell, and session-tabs tests #64875
Merged
3 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@opencode-agent opencode-agent[bot] opencode-agent[bot] left review comments

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

3 participants

@Hona @kitlangton
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.