Repository navigation
Conversation
PI can now look things up on the web for questions the TigerApps don't cover. It uses Anthropic's server-side web_search tool (capped at 3 searches per model call, located in Princeton) instead of re-enabling the shell. The system prompt keeps the apps first for course data and asks for inline links. In chat, a search shows as a card listing the pages it found, and the sources line credits The web. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At the all-hands we said to skip Exa and do web search with curl in the shell. But the shell is off on purpose (
workspaceBash = false, andturndownis stubbed because of that). So this PR uses Claude's own server-side web search instead. It needs no new infra and bills to the Anthropic credits we already have.Server (
src/server/pi.ts)web_search: anthropic.tools.webSearch_20260209({ maxUses: 3, userLocation: Princeton }). It's merged with PI's own tools after the consent filter, so no MCP server can shadow it.claude-opus-5,claude-sonnet-5).maxUses: 3caps searches per model call.[title](url)and to treat page text as untrusted.Client
lib/tools.ts:extractWebSearchgets the query and deduplicated http(s) results.sourceNamecredits "The web".ToolCards.tsx: a "From the web · query" card listing up to 5 pages, plus chips for searching, no results, and failure.ChatPage.tsx: the "Worked from" line names "The web" instead of lumping searches in with "PI's desk".tests/web-search.test.ts: parsing, dedupe, unsafe URLs, failed and running searches.Testing
npm run typecheck,npm test(42 passing) andnpm run buildall pass.{"type":"web_search_20260209","name":"web_search","max_uses":3,...}. I also checked that on the next turn, earlier results are replayed asserver_tool_use+web_search_tool_resultwith their encrypted content.🤖 Generated with Claude Code