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): clearer errors for machine paths by kitlangton · Pull Request #65346 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Two machine-path errors now say what went wrong.
Both came up the first time a real machine was used from an ordinary session.

🚦 Flag: machines. With the flag off, or with no machine of that name, nothing changes.

🐛 Before → after

You write Before After
workdir: "pro:project" or read pro:notes.txt, and a machine named pro exists Silently treated as a local folder: Working directory does not exist: /…/pro:project Machine paths are absolute or start with ~/: write pro:/… or pro:~/…
workdir: "pro:/no/such/dir" Working directory does not exist: /no/such/dir Working directory does not exist on pro: /no/such/dir
// file-access.ts, shared by the file tools and the shell's workdir
"pro:project"   pro is a machine here, rest is not absolute or ~/   →  refused, with the fix in the message
"foo:project"   no machine named foo                                →  a local relative path, as before

Only a name that is a machine on this home is refused, so a local folder that merely looks like a machine name is unaffected. The machine list is an in-memory read, reached only for text shaped name:relative.

📊 Proof

Check Result
Relative machine path fails with the new sentence, for the shell workdir and a file tool ✅
Same text with no such machine resolves locally as before ✅
Missing directory names the machine; the local message is unchanged ✅
machine-path.test.ts ×5, bun typecheck in packages/core ✅ 305 pass · clean

👀 Read: packages/core/src/file-access.ts, the block under MachinePath.parse (18 lines).

Follows #65295

Sorry, something went wrong.

Uh oh!

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

All reactions
@kitlangton
fix(core): clearer errors for machine paths
513837e
@github-actions github-actions Bot added the contributor label Nov 21, 2026
opencodejr[bot]
opencodejr Bot reviewed Nov 21, 2026
View reviewed changes

@opencodejr opencodejr 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. With the machines flag on, a relative name:path for a known machine now gets the new 'machine paths are absolute or start with ~/' error, and a missing remote workdir names its machine. I reproduced both old messages on the base by running the PR's tool-level tests there (they fail with the old text) and confirmed they pass on the PR. On the PR, machine-path.test.ts passes (61/61). The typecheck script can't run here because my Bun 1.4.2 has no bun check; typecheck:tsc is clean. I did not drive the TUI, since it would need a paired machine.

Public API: unchanged (only error text changes).

One small non-blocking point inline: the new check re-implements MachinePath.parse's split by hand.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/core/src/file-access.ts
const machine = !base && enabled ? MachinePath.parse(text) : undefined
// A machine path is absolute or starts with ~/, so `gpu:work` is no machine path and would quietly be this
// server's folder. Only a name that is a machine here is refused: another name stays a local folder, as before.
if (!base && enabled) {

@opencodejr opencodejr Bot Nov 21, 2026

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.

This repeats MachinePath.parse's rules by hand (split on the first colon, the Machines.Name check, the //~ prefixes), so the two can drift apart. You could have parse return the relative case too (e.g. { machine, path, relative: true }) and decide here from that. Also, a local folder really named pro:project is now refused while pro is a machine; adding a hint like ./pro:project to the message would point users to the existing workaround.

Sorry, something went wrong.

Uh oh!

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

All reactions
@kitlangton
fix(core): say how to name a local folder that looks like a machine path
dcf5bc2
@kitlangton
kitlangton merged commit f8d34e1 into dev Nov 21, 2026
10 checks passed

Uh oh!

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

@kitlangton
kitlangton deleted the machine-path-errors branch November 21, 2026 06:50
opencodejr[bot]
opencodejr Bot reviewed Nov 21, 2026
View reviewed changes

@opencodejr opencodejr 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 new commit adds the ./ hint for a local folder named like a machine, which covers half of the earlier inline comment. The other half (the hand-written copy of MachinePath.parse's rules in file-access.ts) is still open. machine-path.test.ts passes (61/61) and tsc -b in packages/core is clean. The public API is unchanged. Nothing new to raise.

Sorry, something went wrong.

Uh oh!

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

All reactions
@kelos-bot kelos-bot Bot mentioned this pull request Nov 21, 2026
[kanon-fake-strategist] Render hooks per agent capability and add OpenCode hook support kelos-dev/kanon#100
Open
@kobzevvv kobzevvv mentioned this pull request Nov 24, 2026
chore(upstream): порт v2.4.1 — 67 в порт, 38 на решение gpt-mem/opencode-mem#223
Open
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

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

Assignees

No one assigned

Labels

contributor

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.

1 participant

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