Repository navigation
feat(assistant): ask before sending data out once an answer read third-party text - #309
Merged
Merged
Conversation
…d-party text Once an answer has read text from outside Lens (a tool's result other than Lens's own, the page it was asked from, the namespace assistant's memories, a message in a chat room open to anyone, or an earlier answer that read any of these), tools that could carry it out of Lens wait for approval even where they'd run at once: the person's own read web tools, other servers' MCP tools, Python tools with the network, and the changes a setup conversation makes itself. The approval card says why. ai.untrusted_asks (on by default) turns it off. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVez82cREgCJtFk6yHReed
The v0.7.0 release bumped the package version without regenerating nextjs-frontend/openapi.json, so the generate-openapi-schema hook fails on any pull request that touches the API. Regenerated with the repository's own command; only the version changes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVez82cREgCJtFk6yHReed
Owner
Author
|
Generated by Claude Code |
…-mj7ggd Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVez82cREgCJtFk6yHReed
adeelahmad
force-pushed
the
claude/project-thread-mj7ggd
branch
from
October 10, 2026 21:54
1b53354 to
22f8527
Compare
This was referenced Oct 10, 2026
19 of 22 tasks
adeelahmad
pushed a commit
that referenced
this pull request
Oct 10, 2026
…tside text (#309) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdrxhwvmLjFsfzQZ5pRJGC
This was referenced Oct 10, 2026
adeelahmad
pushed a commit
that referenced
this pull request
Oct 14, 2026
P-INJECTION-EGRESS: once an answer has read text from outside Lens, outbound tools and setup changes ask first, and chat-room answers keep only the links people, the archive, tools or Lens wrote. Correctness-only, a bypass is VALID-HARDENING (Q26). The Assistant x-prompt-injection row is now claimed; N-PROMPT says marking and flagging make injection less likely and are not claimed; MCP results and the optional classifier are described; Q26 lists #302, #309, #329, #338, #343, #344 and #347. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVez82cREgCJtFk6yHReed
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.
Requested by Adeel · project thread
Description
Before: after the assistant read a poisoned transcript, document, web page or chat-room message, it could call the person's own
readweb tools, another server's MCP tools or a Python tool with the network straight away, so an injection that said "look up https://evil.example/?d=" could carry data out. In a setup conversation, a change the admin's chat makes at once (movingllm.base_url, say) ran just as readily after reading such text.After: once an answer has read text from outside Lens (a tool's result other than Lens's own, the page it was asked from, the namespace assistant's memories, a message in a chat room open to anyone, or an earlier answer in the conversation that read any of these), anything that could carry what it read out of Lens waits for the person's approval, even where it would otherwise run at once. The approval card says why: "Run lookup(q="every excerpt") (asked first: this answer read text from outside Lens: tool read_transcript)". Notes and memories are still written at once: they stay in Lens and are marked as data when read back (#302). Settings → AI assistant → Ask before sending data out after reading third-party text (
ai.untrusted_asks, on) turns it off.Second of the third-party prompt-injection series (#302 marked outside text as data). Next: a free injection-pattern flag, chat-room link defanging, MCP result labelling, and the threat-model update.
Motivation and Context
Adeel asked to handle third-party prompt injection. Marking text as data makes injection less likely; this bounds what a successful one can do: the person decides before anything leaves Lens or changes the server.
How:
Toolboxkeepsoutside(what this answer read from outside Lens, plusread_before(history)for earlier answers whose steps read some);Toolbox.wary()gatesextensions.sends_out(spec)tools (anything but prompt and graph tools, and Python tools without the network) and setup-mode_changeinops_tools. Chat rooms withoutbridge.userscount as outside. Approvals that would happen anyway keep their old wording.Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md. (n/a: the title and docs/assistant.md say it)Done questions (AGENTS.md)
ai.untrusted_asksin Settings → AI assistant, default on.🤖 Generated with Claude Code
https://claude.ai/code/session_01BVez82cREgCJtFk6yHReed
Generated by Claude Code