Boost ops efficiency, drive revenue, & save big with omnichannel messaging

On This Page

Sendbird Client Plugin: Catch Hallucinated APIs in Claude Code and Codex

Client plugin hallucination hero A
Nov 12, 2026 • 10 min read
Tez park
Tez Park
iOS Engineer

Boost ops efficiency, drive revenue, & save big with omnichannel messaging

On This Page

Boost ops efficiency, drive revenue, & save big with omnichannel messaging

AI coding agents write code fast, but they sometimes fill a gap with a guess. Ask for a feature that needs a Sendbird error code, and you can get a number that looks right, compiles, and means something else. The code can compile while it maps a real failure to the wrong message.

The Sendbird Client Plugin is Sendbird's official plugin for Claude Code and Codex. It helps your coding agent add Sendbird Chat, Chat UIKit, and 1:1 voice and video calls to iOS, Android, React, and React Native apps. Before the agent writes Sendbird code, the plugin has it look each API up in the SDK installed in your project, in the plugin's own notes on each SDK, or in Sendbird's docs. For new Sendbird API names the hook detects, it blocks the write when no cited source contains the name. This check doesn't show that the API is right for the task or that the app works at run time.

The plugin uses two different safeguards: hooks check new Sendbird API names against cited sources, and SDK notes give the agent values such as error codes. To show what that changes, we gave Claude Code the same requests with and without the plugin, in a small set of runs on iOS. These runs aren't a test of Codex or of every hook.

Read the Client Plugin guide, start with Add Chat, or browse the plugin source on GitHub.

Compare the same request with and without the plugin

We used Teamline iOS, a small SwiftUI chat app we test with, on the Sendbird Chat SDK for iOS 4.39.14. Each run started from the same commit in a new Claude Code session with the same settings and no project or user instructions. The only difference was whether the Sendbird Client Plugin was installed. We used Claude Opus 5.5, Claude Sonnet 5.5, and Claude Haiku 5.5.

Keep a guessed error code out of the code

Claude Code / Exact request

In Teamline, when a message fails to send, show the reason under the message instead of a generic error: the message contains a blocked word, the message contains a link to a blocked site, or you are sending messages too fast. Keep the generic error for any other failure.

The iOS SDK ships as a compiled framework, so there is no source file to search for these codes. They are listed in the framework's interface file and on the iOS error codes page.

Without the plugin, one of six runs, with Claude Sonnet 5.5, wrote this:

// NOTE: confirm these codes against your Sendbird app/dashboard settings.
private enum SendFailureCode {
    static let blockedWord = 900200      // profanity filter
    static let blockedLink = 900201      // URL/domain filter
    static let rateLimited = 900300      // sending too fast
}

All three codes are wrong:

Code in the runUsed forWhat the code means in SDK 4.39.14
900200Blocked wordToo many messages (socketTooManyMessages)
900201Blocked linkNot in the SDK's ChatError list
900300Sending too fastMessage not found (socketMessageNotFound)

The app still builds, because the code compares plain numbers. When the server rejects a message as one too many (900200), the user is told it contains a blocked word. A message stopped by the profanity filter (900060) gets the generic error. The agent did look first: it cloned the SDK's GitHub repository, which has no source for the compiled SDK, and it didn't open the error codes page. Its final answer said it had guessed the codes, but by then they were in the file.

With the plugin, the request went to the plugin's iOS agent. The agent read the plugin's iOS error table, which lists every ChatError case from the SDK's interface file, and checked the case names in the SDK's interface file in the Xcode build folder. In one run with the plugin, it wrote this (source path shortened):

// source: .../SendbirdChatSDK.swiftmodule/arm64-apple-macos.swiftinterface (ChatError, SBError); codes 900060, 900061, 900200 per knowledge/curated/ios/cross-cutting/errors.md
private static func failureReason(for error: SBError) -> String {
    switch ChatError(rawValue: error.code) {
    case .socketProfanityMessageBlocked:
        return "Your message contains a blocked word."
    case .socketBannedUrlsBlocked:
        return "Your message contains a link to a blocked site."
    case .socketTooManyMessages:
        return "You're sending messages too fast. Wait a moment and try again."
    default:
        return "Couldn't send. Try again."
    }
}

The code names ChatError cases instead of numbers, so a case that doesn't exist would fail the type check, and the type check passed. The answer also explained a choice the table left open: it didn't map 500910 (rateLimitExceeded), because the notes describe it as a general rate limit, not a limit on sending messages.

RequestWithout the pluginWith the plugin
This request, 3 models, 2 runs each1 of 6 runs used wrong codes6 of 6 used the SDK's codes
Claude Sonnet 5.5 on this request and on one about frozen channels and muted users3 of 8 runs used wrong codes8 of 8 used the SDK's codes

Read each row on its own. The second row includes the two Claude Sonnet 5.5 runs from the first row, so the counts don't add up.

In one of the frozen-channel runs without the plugin, a muted user would have been told the channel is frozen. Most runs with the plugin used a development build with the same iOS error table as the released version. Two more runs with the released plugin also used the SDK's codes, and the code above is from one of them.

Get an answer from the changelog, not "couldn't confirm"

The second request was a question. It was the last of four questions about push notifications in the same app:

Claude Code / Exact request (fourth of four questions)

4. Our older release branch still pins SendbirdChatSDK 4.4.0. Is that version safe for push notifications?

The answer is no. The SDK's changelog marks 4.3.1, 4.3.2, 4.4.0, and 4.5.0 "DO NOT USE THIS VERSION" because the pending push token is removed after a user connects. Version 4.5.1 fixed that.

Without the plugin, Claude Opus 5.5 found the changelog and answered correctly. Claude Sonnet 5.5 and Claude Haiku 5.5 said they couldn't confirm and suggested checking the changelog. With the plugin, all three answered no and cited the changelog, and a repeat with the released plugin answered the same. The answers came from the plugin's iOS push notes, which quote the changelog and name the SDK version it was read at.

"I couldn't confirm" isn't a made-up answer. But it leaves you where you started, on a release branch that can lose push tokens.

What these runs show

What we wanted to knowHow it was checkedResultChecked by
Are the error codes the SDK's?Each code compared with ChatError in the SDK 4.39.14 interface fileCounts in the table above, plus the two runs with the released pluginOur team
Does the app build?Type check by the agent; xcodebuild by our team for the run with wrong codesPassed, including the run with wrong codesAgent, then our team
Is the 4.4.0 answer right?Answer compared with the SDK changelogWithout the plugin: 1 correct, 2 couldn't confirm. With the plugin: 3 correct, plus 1 correct repeat with the released pluginOur team
Does the reason appear when a send fails?Not checkedThe app wasn't run against a Sendbird appNot tested

These are a few runs, not a benchmark, and most runs without the plugin got the codes right too. What the plugin changed is where the values came from: in every run with it, the agent took them from the plugin's notes, the installed SDK, or Sendbird's docs and named the source, instead of writing them from memory.

See how the plugin checks its work

The plugin works in two layers.

Instructions and notes. Its skills and platform agents tell the coding agent to look up every Sendbird API before using it: in the SDK installed in your project, in the plugin's notes, in Sendbird's docs, or in Sendbird's public source. The notes are files in the plugin, each marked with the SDK version it was checked against. The iOS error table in the run above is one of them. If a name can't be found, the agent is told to say so and stop, not guess.

Hooks. Hooks are small scripts that Claude Code runs at set moments, such as just before a file is written. Codex runs them too, once you trust them. They enforce part of the instructions. Two of them matter most here:

  • Source check. Before a supported write goes through, the hook checks the Sendbird type and method names it detects in the new code against the cited sources. If no cited source contains a detected name, the write is blocked. Names already in the file aren't checked again. A source is the SDK in your project, a plugin file, a page on sendbird.com/docs, or a file in a github.com/sendbird repository. Other files in your app don't count, even ones the agent just wrote.
  • Final-answer check. An answer that names Sendbird APIs without sources goes back for revision.

The source check reads Sendbird type and method names. A number such as 900200 isn't one, so in the runs above it was the instructions and notes, not a hook, that kept the wrong codes out.

Other hooks block credentials in files and commands, keep a token you paste from being passed on, wait for your approval before a destructive CLI command such as delete, and hold off builds you didn't ask for. The README lists every hook under What runs on your machine.

These checks catch API names that don't exist, and the notes give the agent real values to use. A real API can still be the wrong one for the job, so build the app, test it, and review the code.

Add chat to an app you already have

Most teams add chat to a product that already has users. Here's the flow:

  1. Check the project. setup finds your platform, UI framework, package manager, and any Sendbird SDK you already use, then installs the SDK.
  2. Pick the Sendbird app with the CLI plugin. The Client Plugin uses its App ID.
  3. Connect your users. Point the plugin at your server's token endpoint, and the app asks your server for a token for the signed-in user.
  4. Build the screens. Choose Chat UIKit for ready-made screens or the Chat SDK to build your own. choose-ui compares the two for your project without changing any files.
  5. Test with two accounts. Send messages between two users in the app, and check them with the CLI (Check that chat works).

Your server stays in charge of sign-in and permissions. The plugin writes the app code that requests and uses a Sendbird token, not the server that issues it (server-issued tokens). Channel membership, permissions, and business rules are yours to build and review.

Both requests come from Add Chat. Use your own endpoint, and don't paste real tokens or server keys into the conversation.

Pick the skill for the job

The plugin has 18 skills. Call one by name, or just describe the task. These cover most requests; the skills list has the rest.

You want to…SkillWhat it does
Start a new chat appsetupStarts from one of six starter apps: iOS UIKit, iOS SwiftUI, Android View, Android Compose, React, React Native
Add Sendbird to an existing appsetupInstalls the SDK, connects to Sendbird, and builds a first screen
Add a featureadd-featureAdds reactions, threads, typing indicators, file sharing, push, and more to your existing code
Add voice and video callssetup, calls-incomingSets up 1:1 calls and makes incoming calls ring on iOS and Android
Fix an errorexplain-error, diagnose-channel, fix-buildExplains Sendbird error codes, finds missing or duplicate channels, and fixes build errors
Check that it really worksrun-checkWith your OK, builds a copy of your app and has two test users exchange messages, with screenshots

The run check needs a supported project whose test users can sign in with a user ID and no token. Test your production sign-in, server-issued tokens, token refresh, permissions, and business rules separately. See Check that chat works.

Calls needs Calls turned on in your Sendbird app (this can't be undone), and incoming calls need push credentials. See Add voice and video calls.

Read the common questions

Is this Sendbird's official plugin for Claude Code and Codex?

Yes. Sendbird publishes the Sendbird Client Plugin as sendbird-client in the sendbird/sendbird-plugins marketplace, under the Apache-2.0 license. Its source code is public on GitHub.

Which products and platforms does it support?

Chat (including sign-in and sessions), Chat UIKit, and 1:1 Calls, on iOS, Android, React, and React Native, from Claude Code or Codex. Some skills, such as run-check, support fewer setups. See Supported products and platforms.

Does it stop every hallucinated API?

No. With its hooks on and jq available, it checks the new Sendbird API names it detects against cited sources and blocks a write when a name isn't in them. Its SDK notes help the agent look up values such as error codes. These checks don't cover every identifier or show that an API is right for the job, so build the app, test how it behaves, and review the code.

What does it cost?

The plugin is free and open source. Your Sendbird usage follows your Sendbird plan, and Claude Code or Codex usage is billed by that tool's provider under your plan with them.

Does the plugin send my code to Sendbird?

The README states that none of the plugin's requests sends your project files or conversation to Sendbird. The plugin does fetch public docs pages, install packages, download build tools for a run check, and may search GitHub for an API name through your gh login. Telemetry is off by default. Claude Code or Codex itself sends your conversation, and the files it reads, to its model provider under its own terms.

Install the plugins and try one request

Install the Sendbird Client Plugin, which writes and checks your app code, and the Sendbird CLI plugin, which connects the agent to your Sendbird app. The hooks need jq on your PATH. Without it, they stop checking and ask you to approve every file write and command.

Claude Code

claude plugin marketplace add sendbird/sendbird-plugins
claude plugin install sendbird-client@sendbird
claude plugin install sendbird-cli@sendbird

Codex

codex plugin marketplace add sendbird/sendbird-plugins
codex plugin add sendbird-client@sendbird
codex plugin add sendbird-cli@sendbird

The CLI used by the CLI plugin is available as the Sendbird CLI package on npm; the Client Plugin is installed through your coding agent’s plugin marketplace.

In Codex, when you see "Hooks need review," choose Review hooks and press t. Until you do, the checks don't run.

Then start a new session in your app's folder, sign in and pick a test app with the CLI plugin setup guide, and ask for one thing, such as a channel list and a chat screen. Review the code, then test it with two accounts.

Test users and channels stay in your Sendbird app until you delete them. When you're done, remove the ones you created with chat user delete and chat channel delete in the Sendbird CLI.

To go further with existing code, Chat UIKit customization, and Calls, read Sendbird Client Plugins: Customize and Debug Chat and Calls. More guides: Client Plugin guide, Add Calls, and the CLI plugin.

Start building with Sendbird for free. Add chat to your app with the Client plugin’s Add Chat guide.

If the plugin gets something wrong, open an issue on GitHub.

What are the preferred communication channels of modern customers?