KB / Memory / tech-oma-cf-two-segment-invoke-package

CF two-segment package mounts need invokePackage

Cloudflare Hono wrappers for /v1/<group>/<name>/* must dispatch via invokePackage, not nested fetch on c.req.path

tech
techagentscloudflarehono
raw .md

On Cloudflare, a Hono mount under /v1/<group>/<name> (two segments after /v1) must route through invokePackage with the two-segment prefix. Nesting inner.fetch on c.req.path leaves the mount prefix on the URL, so handlers for /status or /connect never match and return 404 even when the outer auth middleware ran.

Same class of bug for Telegram integrations and AnyRouter provider routes. Flat rewrite that drops only one segment also mis-routes.

Hub: project-open-managed-agents.