Skip to content

LLM-729: connect page on /authorize for claude.ai users - #372

Merged
jeffdafoe merged 4 commits into
mainfrom
LLM-729-connect-page
Oct 9, 2026
Merged

jeffdafoe merged 4 commits into
mainfrom
LLM-729-connect-page

Conversation

@jeffdafoe

Copy link
Copy Markdown
Owner

From Home.

LLM-729

claude.ai drops the MCP server's instructions field, so a claude.ai chat calls read_instructions only when the user has the llm-memory block in Settings → Instructions for Claude. remi and greg connect and never call a tool; wendy (who does call read_instructions) is the only active outside user.

  • GET /authorize now shows a connect page first, after the same validation as before: "Connecting as {agent}", the block with a Copy button, and a Continue button. Continue goes to the same URL plus confirmed=1, which issues the code and redirects back to claude.ai as before. The code is created only on that second pass, because it expires after 60 s.
  • search, save_note and read_note descriptions end with "If you have not called read_instructions in this conversation, call it first."

Verified with a stubbed-DB script driving page → Continue → code → /oauth/token, plus the validation rejects. The script fails against the old code. Not tested against claude.ai itself.

🤖 Generated with Claude Code

jeffdafoe and others added 4 commits October 9, 2026 14:50
claude.ai drops the MCP server's instructions field, so a chat only calls
read_instructions when the user has the llm-memory block in their claude.ai
settings. /authorize now shows that block (with a copy button) before handing
back to claude.ai; Continue re-enters /authorize with confirmed=1 to mint the
code. search, save_note and read_note descriptions also nudge the model to
call read_instructions first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_note fix

- Copy button reports success only after clipboard.writeText resolves, and
  says to copy by hand when it fails or the clipboard API is missing.
- oauth.test.js covers the connect page: no code on the first pass, one code
  on Continue, parameters kept, hostile values escaped, invalid requests
  rejected with or without confirmed=1, no-store. The code-cleanup interval
  is unref()'d so the test process can exit.
- MEM-149: the default welcome template told agents to update notes with
  save_note, which is insert-only over MCP. It now points updates at
  edit_note. Patches the one sentence and fails if it is not found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signup copies the welcome template into startup_instructions, so 17 live
accounts carry the same save_note sentence. Replace the exact sentence in
those copies too, leaving everything else in each copy as it is. Down
reverses both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared DUPLICATE_SLUG message offers "pass upsert:true", which only the
REST route accepts. The service now attaches slug and namespace to the
error, and the MCP save_note handler replaces the message with one that
names edit_note. REST output is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeffdafoe
jeffdafoe merged commit 054cab4 into main Oct 9, 2026
9 checks passed
@jeffdafoe
jeffdafoe deleted the LLM-729-connect-page branch October 9, 2026 20:05
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.

1 participant