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 — feat(core): make shell a Code Mode tool by jlongster · Pull Request #64256 · anomalyco/opencode

Conversation

@jlongster

@jlongster jlongster commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #

Type of change

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

What does this PR do?

Makes shell a Code Mode tool. It is no longer sent to the model as a top-level tool; scripts call it inside execute:

return await tools.shell({ command: "bun test", timeout: 60_000 })
  • tool/plugin/shell.ts: drop codemode: false. The input, output, permissions, timeout and backgrounding are unchanged.
  • When Code Mode is off (execute denied, e.g. the explore agent), the registry's existing fallback still exposes shell as a direct tool.
  • schedule/check.ts: scheduled code conditions can't call shell. Those approve the whole action at once, while scheduled shell conditions approve each parsed command.
  • Tests: the executor tests in tool-shell.test.ts, shell-restart.test.ts and subagent-idle-e2e.test.ts deny execute so they still call shell directly. One test checks that shell is registered only in the Code Mode catalog and runs two commands from one script. location-layer.test.ts no longer expects shell among the direct tools.

This is for trying the change out locally. Some model system prompts (kimi.txt, meta.txt, trinity.txt) still refer to the shell tool by name and haven't been updated.

How did you verify your code works?

  • bun run typecheck:tsc in packages/core
  • Full core suite: 7140 pass. The 4 failures are environment-only and also fail on dev here (ShellParse home expansion, two flock unwritable-root tests as root, and ToolOutput emoji truncation under Bun 1.4.2).

Screenshots / recordings

N/A

Checklist

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@jlongster
feat(core): make shell a Code Mode tool
4c46849
User decisions:
- Move shell into Code Mode only, so it is no longer a top-level tool
- Call it as `tools.shell` inside `execute`
- Open a PR to try it locally
@jlongster jlongster mentioned this pull request Nov 16, 2026
feat(core): move shell into Code Mode behind full_codemode #64284
Merged
3 of 6 tasks
@jlongster jlongster closed this Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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

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