# Chat SDK adds message subjects and direct SDK access

**Published:** May 20, 2026 | **Authors:** Ben Sabic, Josh Singh

---

You can now read the parent issue or pull request when your bot is mentioned in a Linear or GitHub comment. `message.subject` resolves to that parent with title, status, URL, and the full typed payload.

**lib/bot.ts**
```typescript
bot.onNewMention(async (thread, message) => {
  const subject = await message.subject;
  if (subject) {
    await thread.post(
      `This is about: ${subject.title} (${subject.status})\n${subject.url}`
    );
  }
});
```

`message.subject` is cached per message, so repeated access only hits the API once. It resolves to `null` on Slack and other chat platforms, where there's no parent resource.

## Direct access to platform SDKs

The GitHub, Linear, and Slack adapters now expose their underlying platform SDKs. Use them to extend your bot by calling provider APIs directly.

```typescript
// Add a "triaged" label to issue #42
const { octokit } = bot.getAdapter("github");
await octokit.rest.issues.addLabels({ owner: "vercel", repo: "chat", issue_number: 42, labels: ["triaged"] });

// Create a new issue in a team
const { linearClient } = bot.getAdapter("linear");
await linearClient.createIssue({ teamId: "TEAM_ID", title: "Investigate flaky test" });

// Pin a message in a channel
const { webClient } = bot.getAdapter("slack");
await webClient.pins.add({ channel: "C123ABC", timestamp: "1234567890.123456" });
```

The previous `.client` getter remains as a `@deprecated` alias on the adapters.

Read the [documentation](https://chat-sdk.dev/docs/subject) to get started, or explore one of our [templates](https://chat-sdk.dev/resources).

**The Complete Guide to Chat SDK**
Learn how Chat SDK works end-to-end: from core concepts to building your first chatbot to deploying it across platforms.
[Read the guide](https://vercel.com/kb/guide/the-complete-guide-to-chat-sdk)

---

📚 **More updates:** [View all changelog entries](/changelog/sitemap.md) | [Blog](/blog/sitemap.md)