Skip to content

Add shell alias for plugin tool hooks#21

Closed
hawkff wants to merge 2 commits intoNomadcxx:mainfrom
hawkff:upstream/shell-alias-issue-16
Closed

Add shell alias for plugin tool hooks#21
hawkff wants to merge 2 commits intoNomadcxx:mainfrom
hawkff:upstream/shell-alias-issue-16

Conversation

@hawkff
Copy link
Copy Markdown
Contributor

@hawkff hawkff commented Feb 11, 2026

Fixes #16

What

  • Add a compatibility alias in plugin tool hooks so shell maps to the same handler/schema as bash.
  • Keep existing bash behavior unchanged.
  • Add unit coverage verifying shell is registered in plugin hooks.

Why

Some tool/subagent flows emit shell instead of bash.
Without this alias, those calls fail with:

  • Model tried to call unavailable tool 'shell'

This change makes tool-call interception more robust across agent variants.

Validation

  • bun test tests/unit/plugin-tools-hook.test.ts
  • bun run test:ci:unit
  • bun run test:ci:integration

hawkff and others added 2 commits February 11, 2026 17:01
- register shell as a compatibility alias for bash in plugin tool hooks\n- keep existing bash behavior unchanged\n- add unit coverage asserting shell tool registration
@Nomadcxx Nomadcxx self-requested a review February 12, 2026 04:26
@Nomadcxx
Copy link
Copy Markdown
Owner

Hey mate. You are a legend I did see the shell alias gap recently but plan was to move tool handling to the newer provider-boundary architecture (v1) with OpenCode-owned loop as the default, including centralized interception/normalization/guarding in the runtime path. Because of that shift, this branch is now stale/conflicting with current main and would roll back newer changes.

I’ve addressed the remaining intent directly on main by adding the local plugin tool-hook alias shell -> bash (with tests), rather than merging this older branch (check: local hook alias in src/plugin.ts:1386)

Closing as superseded by the current tool-loop/provider-boundary direction.

@Nomadcxx Nomadcxx closed this Feb 12, 2026
@hawkff hawkff deleted the upstream/shell-alias-issue-16 branch February 12, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subagent calls fail...

2 participants