Dashboard › sentry › Session 0sU1gL5MIsZ1
0sU1gL5MIsZ16cYHhUse the sentry-cli skill and Sentry CLI to check for recent 401/authentication errors in the lore project.
Focus on the lore-gateway or lore project specifically.
I'll start by loading the sentry-cli skill and then investigate the authentication errors.
<skill_content name="sentry-cli"> # Skill: sentry-cli # Sentry CLI Usage Guide Help users interact with Sentry from the command line using the `sentry` CLI. ## Agent Guidance Best practices and operational guidance for AI coding agents using the Sentry CLI. ### Key Principles - **Just run the command** — the CLI handles authentication and org/project detection automatically. Don't pre-authenticate or look up org/project before running commands. If auth is needed, the CLI prompts interactively. - **Prefer CLI commands over raw API calls** — the CLI has dedicated commands for most tasks. Reach for `sentry issue view`, `sentry issue list`, `sentry trace view`, etc. before constructing API calls manually or fetching external documentation. - **Use `sentry schema` to explore the API** — if you need to discover API endpoints, run `sentry schema` to browse interactively or `sentry schema <resource>` to search. This is faster than fetching OpenAPI specs externally. ...
Good, skill loaded. Now let me check the org/project setup and start investigating.
[
{
"id": "4507568575217664",
"slug": "frontlist",
"status": {
"id": "active",
"name": "active"
},
"name": "Frontlist",
"dateCreated": "2024-07-08T22:35:39.705443Z",
"isEarlyAdopter": true,
"require2FA": false,
"avatar": {
"avatarType": "letter_avatar",
"avatarUuid": null,
"avatarUrl": null
},
"allowMemberInvite": true,
"allowMemberProjectCreation": false,
"allowSuperuserAccess": true,
"links": {
"organizationUrl": "https://frontlist.sentry.io",
"regionUrl": "https://us.sentry.io"
},
"hasAuthProvider": false
},
{
"id": "275100",
"slug": "byk",
"status": {
"id": "active",
"name": "active"
},
"name": "BYK",
"dateCreated": "2019-06-27T17:16:27.528438Z",
"isEarlyAdopter": true,
"require2FA": true,
"avatar": {
"avatarType": "upload",
"avatarUuid": "3b8bfff998df4fe0b527fcbc60883e06",
"avatarUrl": ...
{
"data": [
{
"team": {
"id": "333445",
"slug": "byk",
"name": "BYK"
},
"teams": [
{
"id": "333445",
"slug": "byk",
"name": "BYK"
}
],
"id": "4511355222622208",
"name": "loreai-gateway",
"slug": "loreai-gateway",
"isBookmarked": false,
"isMember": true,
"access": [
"team:write",
"org:integrations",
"project:write",
"team:admin",
"alerts:read",
"project:admin",
"alerts:write",
"project:read",
"member:read",
"event:write",
"project:releases",
"team:read",
"event:read",
"org:read",
"event:admin"
],
"hasAccess": true,
"dateCreated": "2026-05-08T16:29:52.134615Z",
"environments": [
"production"
],
"features": [
"profile-functions-metrics-eap-ingestion",
...
Found it: org byk, project loreai-gateway. Now let me search for auth-related issues.
{
"data": [
{
"shortId": "LOREAI-GATEWAY-Z",
"title": "Error: Worker upstream auth error: 401 Unauthorized",
"level": "error"
}
],
"hasMore": false,
"hasPrev": false
}
{
"data": [
{
"shortId": "LOREAI-GATEWAY-Z",
"title": "Error: Worker upstream auth error: 401 Unauthorized",
"level": "error"
},
{
"shortId": "LOREAI-GATEWAY-C",
"title": "Error: Worker embedding failed: ONNX runtime out of memory after 3 retries (batch=1, longest≈132 chars). Raw: 284792864",
"level": "error"
},
{
"shortId": "LOREAI-GATEWAY-10",
"title": "Error: Worker embedding failed: pipe is not a function",
"level": "error"
}
],
"hasMore": false,
"hasPrev": false
}
{
"data": [],
"hasMore": false,
"hasPrev": false,
"_searchSyntax": {
"_type": "sentry_search_syntax",
"docs": "https://docs.sentry.io/concepts/search/",
"grammar": "https://github.com/getsentry/sentry/blob/master/static/app/components/searchSyntax/grammar.pegjs",
"behavior": "Terms are space-separated and implicitly ANDed.",
"operators": {
"and": "NOT supported — implicit (space-separated terms are all required)",
"or": "NOT supported — use key:[val1,val2] in-list syntax instead",
"not": "!key:value (prefix with !)",
"comparison": [
">=",
"<=",
">",
"<",
"=",
"!="
],
"wildcard": "* in values (e.g., message:*timeout*)",
"inList": "key:[val1,val2] — matches any value in the list"
},
"filterTypes": [
"text (key:value)",
"text_in (key:[val1,val2])",
"numeric (key:>100, key:<=50)",
"boolean (key:true, key:false)",
"date ...
{
"data": [],
"hasMore": false,
"hasPrev": false,
"_searchSyntax": {
"_type": "sentry_search_syntax",
"docs": "https://docs.sentry.io/concepts/search/",
"grammar": "https://github.com/getsentry/sentry/blob/master/static/app/components/searchSyntax/grammar.pegjs",
"behavior": "Terms are space-separated and implicitly ANDed.",
"operators": {
"and": "NOT supported — implicit (space-separated terms are all required)",
"or": "NOT supported — use key:[val1,val2] in-list syntax instead",
"not": "!key:value (prefix with !)",
"comparison": [
">=",
"<=",
">",
"<",
"=",
"!="
],
"wildcard": "* in values (e.g., message:*timeout*)",
"inList": "key:[val1,val2] — matches any value in the list"
},
"filterTypes": [
"text (key:value)",
"text_in (key:[val1,val2])",
"numeric (key:>100, key:<=50)",
"boolean (key:true, key:false)",
"date ...
Found the key issue: LOREAI-GATEWAY-Z. Let me get full details and recent events.
...output truncated...
Full output saved to: /home/byk/.local/share/opencode/tool-output/tool_e94730374001xg1y0guiUKmc2x
"event_id": null
},
{
"type": "default",
"timestamp": "2026-06-04T15:18:32.525000Z",
"level": "error",
"message": "[lore] warning: could not determine project for session 1JfYU6zFNZdfQYke — falling back to process.cwd() (/home/byk/.local/share/opencode/worktree/51d1015fd1f616acf9a5ffaad9331ec6b304586b/clever-circuit). Data may be misattributed. Fix: launch your agent via `lore run`, or have your client send the \"X-Lore-Project: /path/to/project\" header (provider-agnostic; e.g. via ANTHROPIC_CUSTOM_HEADERS for Claude Code, the OpenCode/Pi plugins, or your client's custom-header mechanism).",
"category": "console",
"data": {
"arguments": [
"[lore] warning: could not determine project for session ...
...output truncated...
Full output saved to: /home/byk/.local/share/opencode/tool-output/tool_e94731ce8001CgIX7NPjpWYfL2
"key": "user",
"value": "id:ccff2dbd-4d69-47cd-9a65-f3791122ae88",
"query": "user.id:\"ccff2dbd-4d69-47cd-9a65-f3791122ae88\""
},
{
"key": "server_name",
"value": "DESKTOP-FOASM6G"
},
{
"key": "transaction",
"value": "POST /v1/chat/completions"
},
{
"key": "upstream_url",
"value": "https://api.deepseek.com"
},
{
"key": "url",
"value": "http://127.0.0.1:3207/v1/chat/completions"
}
],
"platform": "node",
"dateCreated": "2026-06-01T15:58:54Z",
"crashFile": null,
"metadata": {
"filename": "../src/batch-queue.ts",
"function": "<object>.poll",
"in_app_frame_mix": "mixed",
"type": "Error",
"value": "Worker upstream auth ...
Let me get the issue-level aggregate stats and also check for resolved issues.
{
"data": [
{
"shortId": "LOREAI-GATEWAY-Z",
"title": "Error: Worker upstream auth error: 401 Unauthorized",
"level": "error",
"status": "unresolved"
},
{
"shortId": "LOREAI-GATEWAY-12",
"title": "Error: Worker upstream auth error: 403 Forbidden",
"level": "error",
"status": "resolved"
}
],
"hasMore": false,
"hasPrev": false
}
shortId: LOREAI-GATEWAY-Z title: Error: Worker upstream auth error: 401 Unauthorized count: 10728 userCount: 26 firstSeen: 2026-05-21T19:29:57.561000Z lastSeen: 2026-06-04T15:18:37.328000Z status: unresolved level: error
Now let me get the tag breakdowns to understand the distribution by upstream, model, user, and workerID.
=== upstream_url breakdown === https://api.anthropic.com: 10368 events (0.0%) https://api.deepseek.com: 281 events (0.0%) : 53 events (0.0%) https://api.openai.com: 27 events (0.0%)
=== model breakdown === claude-opus-4-7: 10059 events (0.0%) claude-sonnet-4-6: 307 events (0.0%) deepseek-v4-pro: 181 events (0.0%) deepseek-v4-flash: 100 events (0.0%) : 36 events (0.0%) vllm-model: 27 events (0.0%) claude-sonnet-4-20250514: 19 events (0.0%)
=== server_name breakdown === onur-ThinkPad-E470: 10059 events (0.0%) HQYT2D22F0: 307 events (0.0%) DESKTOP-FOASM6G: 196 events (0.0%) Lucas: 47 events (0.0%) runnervmg397c: 40 events (0.0%) DESKTOP-0MALEDE: 32 events (0.0%) miko-NUC14RVH-B: 27 events (0.0%) runnervmrw5os: 8 events (0.0%) labs: 7 events (0.0%)
=== release breakdown === 0.24.0: 6704 events (0.0%) 0.24.1: 3708 events (0.0%) 0.24.1-dev.1779392674: 307 events (0.0%) 0.23.0: 8 events (0.0%) 0.22.0: 2 events (0.0%)
Now I have a complete picture. Here's the report:
Issue: LOREAI-GATEWAY-Z — Error: Worker upstream auth error: 401 Unauthorized
Status: Unresolved
First Seen: 2026-05-21 19:29 UTC
Last Seen: 2026-06-04 15:18 UTC (today)
Total Events: 10,728
Affected Users: 26
There is also a related resolved issue LOREAI-GATEWAY-12 for 403 Forbidden errors.
| Upstream | Events | Share |
|---|---|---|
| api.anthropic.com | 10,368 | 96.6% |
| api.deepseek.com | 281 | 2.6% |
| (empty/unknown) | 53 | 0.5% |
| api.openai.com | 27 | 0.3% |
The vast majority (96.6%) of 401 errors come from Anthropic API calls.
| Model | Events | Share |
|---|---|---|
| claude-opus-4-7 | 10,059 | 93.8% |
| claude-sonnet-4-6 | 307 | 2.9% |
| deepseek-v4-pro | 181 | 1.7% |
| deepseek-v4-flash | 100 | 0.9% |
| (empty) | 36 | 0.3% |
| vllm-model | 27 | 0.3% |
| claude-sonnet-4-20250514 | 19 | 0.2% |
claude-opus-4-7 accounts for 93.8% of all events.
| Server | Events | Share |
|---|---|---|
| onur-ThinkPad-E470 | 10,059 | 93.8% |
| HQYT2D22F0 | 307 | 2.9% |
| DESKTOP-FOASM6G | 196 | 1.8% |
| Lucas | 47 | 0.4% |
| runnervmg397c | 40 | 0.4% |
| DESKTOP-0MALEDE | 32 | 0.3% |
| miko-NUC14RVH-B | 27 | 0.3% |
| runnervmrw5os | 8 | 0.1% |
| labs (yours) | 7 | 0.1% |
One user (onur-ThinkPad-E470) is responsible for 93.8% of all 401 events, all hitting claude-opus-4-7 via api.anthropic.com.
| Release | Events |
|---|---|
| 0.24.0 | 6,704 |
| 0.24.1 | 3,708 |
| 0.24.1-dev.1779392674 | 307 |
| 0.23.0 | 8 |
| 0.22.0 | 2 |
packages/gateway/src/llm-adapter.ts (also batch-queue.ts for the DeepSeek storm)lore-compact (the latest event — a compaction worker ...