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 — refactor(core)!: call the session tools opencode.session.rename and .move in Code Mode by rekram1-node · Pull Request #65080 · anomalyco/opencode

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Nov 20, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Breaking change for Code Mode paths: the two session tools move into an opencode.session namespace.

Code Mode before Code Mode after Direct name / permission action
tools.opencode.session_rename tools.opencode.session.rename opencode_session_rename (unchanged)
tools.opencode.session_move tools.opencode.session.move opencode_session_move (unchanged)

Called directly (Code Mode off or execute denied), the names stay the same, because the runtime already turns dots in a namespace into underscores. So permission rules and saved approvals keep working and need no translation.

What breaks: programs that call the old Code Mode paths, including stored code automations, which now fail with an unknown tool. The list of tools automations may not call (automation/code.ts) uses the new paths. The worktree hint in opencode.ts and the tools.mdx docs are updated too.

Other opencode tools (worktree, automation, artifact, MCP, models) keep their current names for now.

How did you verify your code works?

  • packages/core: typecheck:tsc; tool-opencode, automation, tool-model-policy and tool-automation tests pass (65).

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Public API: renames Code Mode paths tools.opencode.session_rename/session_move → tools.opencode.session.rename/.move (old Code Mode paths break; direct names and permission actions unchanged)

Sorry, something went wrong.

Uh oh!

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

All reactions
@rekram1-node
refactor(core)!: call the session tools opencode.session.rename and .…
7a2d559
…move in Code Mode
@rekram1-node
rekram1-node force-pushed the tool-namespaces branch from 3fa42b7 to 7a2d559 Compare November 20, 2026 06:52
@rekram1-node rekram1-node changed the title refactor(core)!: nest built-in opencode tools as opencode.<noun>.<verb> in Code Mode refactor(core)!: call the session tools opencode.session.rename and .move in Code Mode Nov 20, 2026
opencodejr[bot]
opencodejr Bot reviewed Nov 20, 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 rename looks sound. I ran the closest core tests (the one failure also fails on the base) and the core type check (typecheck:tsc), which passes. The updated tests exercise the new nested Code Mode paths end to end and confirm the direct tool IDs are unchanged.

Public API impact (not fully backwards compatible):

  • Code Mode paths: opencode.session_* / worktree_* / automation_* / artifact_* → opencode.<noun>.<verb>. list_mcp_resources / read_mcp_resource / list_mcp_events → opencode.mcp.resource.list / .read, opencode.mcp.event.list. Programs and stored code automations using the old paths now fail as unknown tools.
  • Direct tool names and permission actions: opencode_list_mcp_resources → opencode_mcp_resource_list, opencode_read_mcp_resource → opencode_mcp_resource_read, opencode_list_mcp_events → opencode_mcp_event_list. Old names are mapped only for config rules and saved approvals (see inline comment). Plugins that match on the old direct tool IDs need updating.
  • All other direct tool names and permission actions are unchanged.

One concern, inline: old action names are not mapped for rules attached to a session or for plugin-defined agents.

  • packages/core/src/permission.ts:104: currentAction only runs where config rules are loaded (config/plugin/agent.ts) and where saved approvals are read. Two other rule sources skip it: - session-level permissions (set through the session create/update HTTP API and stored on the session) - agents whose permissions come from a plugin instead of config In both cases a rule like opencode_read_mcp_resource: deny quietly stops applying once this lands. Applying the mapping where rules are matched (evaluate, or merge) would cover every source in one place and make the call in expandPermissions unnecessary.

Sorry, something went wrong.

Uh oh!

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

All reactions
@rekram1-node
test(core): deny a nested-namespace tool by its flattened name
ad090d8
@rekram1-node
rekram1-node enabled auto-merge (squash) November 20, 2026 06:56
@rekram1-node
rekram1-node merged commit 8e50929 into dev Nov 20, 2026
11 checks passed

Uh oh!

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

@rekram1-node
rekram1-node deleted the tool-namespaces branch November 20, 2026 07:01
opencodejr[bot]
opencodejr Bot reviewed Nov 20, 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 narrowed change looks sound. I ran the closest core tests (115 pass, including the new tool-registry test) and the core type check (typecheck:tsc), which passes.

My earlier concern about mapping old permission action names no longer applies: this version renames no actions.

Public API impact, not backwards compatible for Code Mode callers: tools.opencode.session_rename → tools.opencode.session.rename and tools.opencode.session_move → tools.opencode.session.move. Programs and stored code automations that use the old paths now fail as unknown tools. Direct tool names and permission actions (opencode_session_rename, opencode_session_move) are unchanged.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Edo771977 Edo771977 mentioned this pull request Nov 20, 2026
chore: merge upstream/dev into the fork Edo771977/opencode#95
Merged
@BrewTestBot BrewTestBot mentioned this pull request Nov 23, 2026
opencode 2.4.0 Homebrew/homebrew-core#327368
Merged
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
opencode 2.4.0 amrkmn/homebrew-tap#1251
Closed
1 task
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
feat: opencode release v2.4.0 sprisa/opencode-server#95
Merged
@kobzevvv kobzevvv mentioned this pull request Nov 24, 2026
chore(upstream): порт v2.4.1 — 67 в порт, 38 на решение gpt-mem/opencode-mem#223
Open
4 tasks
@scottames-github-bot scottames-github-bot Bot mentioned this pull request Nov 27, 2026
chore(deps): update ⬆️ mise-packages scottames/dots#1181
Merged
1 task
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

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.

1 participant

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