Skip to content

One search across the World's saved Service context for Agents - #666

Merged
renkelvin merged 1 commit into
mainfrom
claude/project-thread-377bg9-context-search
Oct 18, 2026
Merged

renkelvin merged 1 commit into
mainfrom
claude/project-thread-377bg9-context-search

Conversation

@renkelvin

Copy link
Copy Markdown
Contributor

Gap fix B. Since #657, a connected Service's context is saved into the World every hour. Agents can now search and read that saved context with one World tool instead of calling each Service live.

  • The tool, world_context (targets context/search and context/read):
    • search takes a query and matches every word against the saved records of every Service the Agent may read. It returns at most 20 results, each with an ID <provider>:<recordId> and a short snippet.
    • read takes one of those IDs and returns the saved record.
    • Results are marked as untrusted content, and the tool is in the untrusted-turn list (turn-trust.ts). It reads only the saved snapshots, so a search makes no request to the Service.
  • Gated by each Service's own read Grant.
    • The context targets come with every Service's "Can read" Grant (serviceGrantTargets), so granting a Service also covers its saved context.
    • Each result is kept only if the Agent's own Grants allow read_service on that Service (standingCallDecision). A Service the Agent may not read is never searched for it.
    • Only the Agent's own Grants count, never a Fox turn's (OWN_GRANT_TARGETS). Fox itself is refused with a pointer to read_service.
  • Where it lives:
    • Pure Core: core/accounts/services/context.ts (serviceContext, limits and reasons).
    • Snapshots: the host's serviceContext in modules/sources/service-sync.ts, over the current non-Notion sync jobs.
    • Dispatch: world-tool-bridge.ts.

Docs: INTEGRATIONS.md § Searching saved Service context, GRANTS.md, README.md and README.zh.md.

Checks:

  • New: scripts/service-context-check.ts, added to test:core.
  • Updated for the context targets on a Service Grant:
    • agent-grants-check
    • github-service-check
    • harness-sessions-check
    • mcp-service-records-check
    • world-actions-equivalence-check
  • npm run check:pr, npm test and npm run test:ui:pr pass locally.

Generated by Claude Code

The world tool world_context (context/search and context/read) searches
and reads what the World keeps up to date from every connected Service,
without asking a Service. Every "Can read <Service>" Grant names both
targets, and an answer holds only the Services the calling Agent may
read. It runs on the standing worldlet MCP server, so it also works
through Remote access.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QruYYCM2FUfEGXqKwSd7m7
@renkelvin renkelvin self-assigned this Oct 18, 2026
@renkelvin
renkelvin enabled auto-merge (squash) October 18, 2026 10:50
@renkelvin
renkelvin merged commit b9487d0 into main Oct 18, 2026
5 checks passed
@renkelvin
renkelvin deleted the claude/project-thread-377bg9-context-search branch October 18, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants