You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unmatched /v2 URLs show Astro's default 404 page instead of the branded one #46348
Opening a /v2 URL that does not exist, like https://opencode.ai/v2/docs.md, shows Astro's stock "404: Not found" page instead of the branded 404 the main site has (compare https://opencode.ai/docs.md). A wrong docs slug like /v2/docs/bogus-page returns plain text "Not found".
Thanks for the report, I can confirm this on opencode.ai:
/v2/not-found and /v2/docs.md return 404 with Astro's stock "404: Not Found" page.
/v2/docs/bogus-page returns 404 with the plain-text body Not found.
/docs.md returns the branded OpenCode 404 page.
The current dev source (06d3c06) is unchanged: the v2 site (services/www) still has no 404.astro, and the docs slug route still returns a plain-text Not found response. I checked this by reading the code rather than running the site locally. The script below runs the curl checks. Related: #56800, where /v2/docs/ecosystem is a 404.
Reproduction script (check-404.sh)
#!/usr/bin/env bash# Reproduces #46348: unmatched /v2 URLs on opencode.ai don't use the branded 404 page.set -u
tmp=$(mktemp)foruin https://opencode.ai/v2/not-found https://opencode.ai/v2/docs.md https://opencode.ai/v2/docs/bogus-page https://opencode.ai/docs.md;do
code=$(curl -s -o "$tmp" -w "%{http_code} %{content_type}""$u")
title=$(grep -o '<title>[^<]*'"$tmp"| head -1 | sed 's/<title>//')echo"$u -> $code | title: ${title:-<none>} | body starts: $(head -c 60 "$tmp"| tr '\n''')"done
rm -f "$tmp"# Expected: /v2/* 404s render the branded OpenCode 404 like /docs.md does.# Actual: /v2/not-found and /v2/docs.md -> Astro's stock "404: Not Found" page;# /v2/docs/bogus-page -> plain text "Not found".
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the report, I can confirm this on opencode.ai:
/v2/not-foundand/v2/docs.mdreturn 404 with Astro's stock "404: Not Found" page./v2/docs/bogus-pagereturns 404 with the plain-text bodyNot found./docs.mdreturns the branded OpenCode 404 page.The current
devsource (06d3c06) is unchanged: the v2 site (services/www) still has no404.astro, and the docs slug route still returns a plain-textNot foundresponse. I checked this by reading the code rather than running the site locally. The script below runs the curl checks. Related: #56800, where/v2/docs/ecosystemis a 404.Reproduction script (check-404.sh)
Run it:
bash check-404.sh