Skip to content

fix(plugin): label custom providers that extend Claude - #1

Open
slamdev wants to merge 1 commit into
getpaseo:mainfrom
slamdev:fix/custom-claude-providers
Open

slamdev wants to merge 1 commit into
getpaseo:mainfrom
slamdev:fix/custom-claude-providers

Conversation

@slamdev

@slamdev slamdev commented Nov 1, 2026

Copy link
Copy Markdown

Problem

The agent.session_open hook only labels sessions whose provider ID is exactly claude:

if (request.provider !== "claude") return;

Custom providers declared in agents.providers with "extends": "claude" (e.g. claude-work, used to give Claude separate credentials or a proxy base URL) get their own provider ID, so their sessions never receive CLAUDE_CODE_ENTRYPOINT=Paseo and Claude Code falls back to sdk-cli. Setups that disable the built-in claude provider and run only custom ones get no label at all.

Change

  • Resolve the provider type instead of matching the ID: follow the extends chain from paseo.config.get() (config.providers[id].extends) until it reaches claude.
  • The built-in claude provider keeps a fast path, so it never reads the config.
  • An extends cycle ends the lookup, and the session is left unchanged.
  • If the config can't be read, the hook returns unchanged rather than throwing, because a throwing before hook fails the session open.
  • README/OVERVIEW now mention custom providers.

paseo.config is already in the pinned @getpaseo/plugin 0.8.0-beta.1, so the requirements.paseo range is unchanged.

Verification

  • npm test, typecheck, lint and format:check pass. New tests cover a direct extends: "claude", a chained one, a non-Claude provider whose name starts with claude, an extends cycle, and a config read failure.
  • Tested on Paseo 0.14.0 with the built-in claude disabled and a custom claude-* provider extending it: before the change the agent's Claude process had CLAUDE_CODE_ENTRYPOINT=sdk-cli; with this branch installed it has CLAUDE_CODE_ENTRYPOINT=Paseo.

🤖 Generated with Claude Code

The hook matched the provider ID "claude" only, so agents on custom
providers declared with `extends: "claude"` (e.g. "claude-work") never got
the entrypoint label. Resolve the provider type by following the configured
`extends` chain through `paseo.config.get()`. The built-in provider keeps its
fast path, cycles end the walk, and a config read failure leaves the session
unchanged instead of failing the open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant