Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

opencode.tools adds the execute / session_move hint even when Code Mode is denied

Open Beginner friendly
#57,711 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Yun-0000 is already working on this.

Since Oct 21, 2026.

  • #57809 by @Yun-0000 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

The built-in opencode.tools plugin adds the hint to context, compaction and generate requests, while Tool.snapshot determines whether execute is available. Read those entry points and trace how the session agent’s permission rules reach the plugin; check existing tests for tool snapshots or system prompt parts. Done when the hint is omitted for sessions where execute is wholly denied and remains available otherwise.

Written by the indexing model from the issue text.

Description

reproduced
Description

When Code Mode is turned off with a permission rule ({ "action": "execute", "resource": "*", "effect": "deny" }), Tool.snapshot doesn't build the execute tool (codeModeEnabled = !whollyDisabled("execute", rules)), but the built-in opencode.tools plugin still adds this system part to every context, compaction and generate request:

When you create a worktree outside the current working directory and intend to use it as your primary working directory, consider using execute to call tools.opencode.session_move and make the worktree the session's working directory.

The model is told to use a tool it isn't offered (and tools.opencode.* are Code Mode only, so they aren't reachable either).

Expected: skip the hint when execute is wholly denied for the session's agent.

Related: #48749 (the hint now also reaches compaction and generate requests).

Plugins

Own plugins via the SDK (embedded host); the hint comes from the built-in opencode.tools.

OpenCode version

@opencode/core 2.0.32

Steps to reproduce
  1. Config with "permissions": [{ "action": "*", "resource": "*", "effect": "allow" }, { "action": "execute", "resource": "*", "effect": "deny" }].
  2. Send a prompt.
  3. The request has no execute tool, but its system prompt still contains the execute / tools.opencode.session_move hint.
Dominant language
TypeScript
Stars
221k
Forks
29.6k
Avg merge
4h 35m
Merged PRs (30d)
521

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anomalyco/opencode

All issues in anomalyco/opencode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.