YBacked by Y Combinator

Codebase Search for Coding Agents.

>

add rate limiting to the webhook endpoint, matching how we already do it

·

Agent (enriched with perseus)

Already enforced in the shared limiter, called from the webhook handler before dispatch.

  • Claude Code
  • Cursor
  • Codex
  • CLI
and everywhere else you work

Perseus in the coding session gives your agent cited code context before it edits.

A few of my dashboard routes seem to not redirect you to login when un-authenticated

I need the auth boundary before editing. Start with a narrow semantic search, then follow the route into the proxy and tests.

Ran perseus queryFinds the right code by meaning before the agent opens files or edits anything.Query: auth enforcement on query routeAnswer:[ { "path": "console/lib/server-auth.ts", "line_range": "80-86", "code": "export async function requireServerPerseusAuth(...) { const auth = await getServerPerseusAuth(); if (!auth) redirect(...); }" }, { "path": "console/app/api/query/route.ts", "line_range": "45-53", "code": "const result = await submitQuery({ index_id: v.index_id, query: v.query, top_k: v.top_k });" }] "auth enforcement on query route"

rank path signal

01 console/lib/server-auth.ts:31-77 session helper

02 perseus/core/routes/query.py:82-139 backend bearer boundary

03 console/app/api/query/route.ts:9-45 console proxy

The hit order says the helper owns the decision, the backend enforces it, and the console proxy is only transport. I should not edit the proxy unless the contract forces it.

Ran perseus researchCombines linked questions so the agent sees the files, tests, and contract together.Query: where auth is checked; tests for query authAnswer:[ { "path": "console/lib/server-auth.ts", "line_range": "40-46", "code": "const session = await getServerSession(authOptions); if (session?.tenant_id && session.user_id) { const bearerToken = await signTenantJwt({" }, { "path": "console/lib/server-auth.ts", "line_range": "60-64", "code": "return { bearerToken, tenantId: session.tenant_id, userId: session.user_id };" }] "where auth is checked" "tests for query auth"

packet: server helper, API proxy, backend route

bridge: console route forwards bearer token unchanged

tests: console smoke, query auth, token rejection

Research ties the files together: browser session becomes a bearer token, the proxy forwards it, the backend rejects missing or stale credentials. Now check who depends on the helper.

Ran perseus impactChecks the graph before editing a shared symbol, so the agent knows what can break.Query: requireUserAnswer:[ { "path": "console/lib/server-auth.ts", "line_range": "80-86", "code": "const auth = await getServerPerseusAuth(); if (!auth) redirect(`/api/auth/signin?callbackUrl=${encodeURIComponent(callbackUrl)}`);" }, { "path": "console/lib/server-auth.ts", "line_range": "38-77", "code": "export const getServerPerseusAuth = cache(async (): Promise<ServerPerseusAuth | null> => { ... return null; });" }] requireUser

callers: api/query, repo graph, onboarding gate

tests: smoke.spec.ts, test_cli_login.py, test_product_orgs_billing.py

risk: do not change proxy response shape

Impact is small enough to patch requireUser. Keep the proxy response shape unchanged and run only the tests Perseus surfaced.

Ran perseus evalTurns the current diff into the smallest useful verification plan.Query: current auth diffAnswer:[ { "path": "console/app/api/query/route.ts", "line_range": "50-54", "code": "if (result.ok) return NextResponse.json({ run_id: result.run_id, started_at: result.started_at, stream_url: result.stream_url }, { status: 202 });" }, { "path": "console/app/api/query/route.ts", "line_range": "56-57", "code": "return NextResponse.json({ message: result.message }, { status: result.status || 500, headers });" }] --diff

watch: query smoke, auth proxy, token rejection

diff contract: user stays required, token error stays 401

status: narrow change, run the pinned tests

Worked for 42s

The source edit is ready. Perseus narrowed the read to the auth helper, the query route, and the proxy tests before the patch.

Changed 3 files: +84 -19

The Perseus console lets you run a query, watch the planner search your codebase live, and open any citation it finds, all in one place.

Give every agent a repo-trained search model.

Claude Code, Cursor, Codex, and your own agents can call Perseus when they need to understand a codebase before they edit it.