Skip to content

feat!: SDK-only transport — remove legacy API path#30

Merged
cpfiffer merged 10 commits intomainfrom
feat/sdk-only-breaking-change
Mar 14, 2026
Merged

feat!: SDK-only transport — remove legacy API path#30
cpfiffer merged 10 commits intomainfrom
feat/sdk-only-breaking-change

Conversation

@cpfiffer
Copy link
Collaborator

Summary

  • Remove legacy API path (LETTA_SDK_TOOLS=off). All message delivery to Sub now goes through the Letta Code SDK exclusively.
  • Fix conversation conflictssync_letta_memory.ts and plan_checkpoint.ts were racing the SDK worker on the same conversation (409 errors). Legacy paths now removed entirely.
  • Use resumeSession(conversationId) so SDK sessions appear in the correct conversation thread on app.letta.com.
  • Update Sub's tool_guidelines memory block and bundled .af file to tell Sub about Read/Glob/Grep client-side tools.

Breaking changes

  • LETTA_SDK_TOOLS=off is removed. The SDK is now required.
  • send_worker.ts (legacy raw API worker) deleted
  • plan_checkpoint.ts (was a no-op in SDK mode) deleted
  • Users who need the old behavior should pin to a pre-SDK tag

Files deleted

  • scripts/send_worker.ts — legacy worker that sent messages via raw fetch() to the Letta API
  • scripts/plan_checkpoint.ts — PreToolUse checkpoint hook, was already a no-op in SDK mode

Net diff

~750 lines deleted

Test plan

  • Existing tests pass (32/32)
  • Manual test: restart Claude Code session, verify Sub responds with tools
  • Verify Sub uses Read/Glob/Grep when processing transcripts
  • Confirm no 409 conversation conflicts in SDK worker logs
  • Verify messages appear in correct conversation on app.letta.com

Written by Cameron ◯ Letta Code

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint-Exupéry

cpfiffer added 10 commits March 13, 2026 16:29
resumeSession(conversationId) instead of resumeSession(agentId) so that
SDK-routed messages show up in the same conversation on app.letta.com.

Written by Cameron ◯ Letta Code

"All problems in computer science can be solved by another level of indirection." - David Wheeler
…e with SDK

resumeSession(conversationId) silently fails (0 chars response) when the
conversation was created via the raw Letta API. The SDK needs to manage
its own conversation. Revert to agentId for now.

Written by Cameron ◯ Letta Code

"Move fast and fix things." - Unknown
Revert to resumeSession(conversationId) and log every stream message
type to diagnose why the session returns 0 chars.

Written by Cameron ◯ Letta Code

"Debugging is twice as hard as writing the code." - Brian Kernighan
In SDK mode, sync_letta_memory.ts and plan_checkpoint.ts were still
spawning legacy send_worker.ts — racing the SDK worker on the same
conversation and causing 409 CONFLICT errors (0 chars response).

- sync_letta_memory: skip early prompt notification in SDK mode
- plan_checkpoint: skip entirely in SDK mode (Stop hook handles it)

Written by Cameron ◯ Letta Code

"Two threads enter, one thread leaves." - Mad Max, concurrent edition
Add Read, Glob, Grep to tool_guidelines so Sub knows it has
filesystem access via the Letta Code SDK transport.

Written by Cameron ◯ Letta Code

"Know thyself." - Socrates
BREAKING CHANGE: The `LETTA_SDK_TOOLS=off` option is removed. All
message delivery to Sub now goes through the Letta Code SDK. Users
who need the old behavior should pin to a pre-SDK tag.

Deleted:
- scripts/send_worker.ts (legacy raw API worker)
- scripts/plan_checkpoint.ts (was no-op in SDK mode)

Removed:
- Legacy branch in send_messages_to_letta.ts
- Early prompt notification in sync_letta_memory.ts
- sendMessageToConversation from conversation_utils.ts
- Checkpoint hook from hooks.json

Written by Cameron ◯ Letta Code

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint-Exupéry
- Remove checkpoint docs, legacy `off` mode, and stale log file refs from README
- Clean up verbose per-message stream logging in SDK worker (keep tool calls + errors)
- Bump version to 2.0.0 in package.json and plugin.json

Written by Cameron ◯ Letta Code

"Less is more." - Ludwig Mies van der Rohe
off now means "no client-side tools" — Sub still receives transcripts
via the SDK transport but can only use memory operations. Useful for
listen-only agents that observe without filesystem access.

Written by Cameron ◯ Letta Code

"Listening is an art that requires attention over talent." - Dean Jackson
send_worker.log → send_worker_sdk.log

Written by Cameron ◯ Letta Code

"The devil is in the details." - Proverb
Written by Cameron ◯ Letta Code

"Clean code always looks like it was written by someone who cares." - Robert C. Martin
@cpfiffer cpfiffer merged commit 7247275 into main Mar 14, 2026
@cpfiffer cpfiffer deleted the feat/sdk-only-breaking-change branch March 14, 2026 01:23
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