Skip to content

feat(core,sdk,webapp): version skew protection for chat.agent sessions - #4789

Open
0ski wants to merge 2 commits into
mainfrom
oskar/feat-chat-agent-version-skew-protection
Open

feat(core,sdk,webapp): version skew protection for chat.agent sessions#4789
0ski wants to merge 2 commits into
mainfrom
oskar/feat-chat-agent-version-skew-protection

Conversation

@0ski

@0ski 0ski commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

A chat session now carries an external deployment id, so every run it schedules lands on the deployment that matched the app build that started the conversation: the first run, each continuation after an idle suspend, and each recovery after a crash. A chat started by one release of your app keeps talking to the agent build that release shipped with, however many turns that takes.

The id is resolved wherever the session is started, with the same precedence trigger() already uses: an explicit externalDeploymentId, then configure(), then TRIGGER_EXTERNAL_DEPLOYMENT_ID, then your platform's commit SHA when TRIGGER_AUTOMATIC_SKEW_VERSION_PROTECTION is 1. If none of those yields a value, no id is sent and nothing changes: the chat's runs go to the current version exactly as they do today, and nothing parks.

There is no chat-specific setup either way, so an app already pinning its task runs gets pinned chats with no code change:

// app/actions.ts
"use server";
import { chat } from "@trigger.dev/sdk/ai";
import type { myChat } from "@/trigger/chat";

export const startChatSession = chat.createStartSessionAction<typeof myChat>("my-chat");

Chats need the same two halves as tasks and no more: a deployment carrying an id, and an app that sends the same one. Pass externalDeploymentId: null on triggerConfig to opt one chat out while the rest of the app stays pinned.

Pinning to an id you choose

Discovery covers the common case, a commit SHA your platform already exposes. To name the deployment yourself instead, deploy the agent under that id and give your app the same value:

npx trigger.dev@latest deploy --external-id "$RELEASE_ID"
// app/actions.ts
export const startChatSession = chat.createStartSessionAction<typeof myChat>("my-chat", {
  triggerConfig: { externalDeploymentId: process.env.RELEASE_ID },
});

sessions.start({ triggerConfig: { externalDeploymentId } }) and AgentChat's triggerConfig take the same field. Setting TRIGGER_EXTERNAL_DEPLOYMENT_ID in the app's environment does the same job without touching code, and an explicit value wins over it.

Waiting on a deployment

A run pinned to a deployment that has not landed yet parks rather than failing, and messages sent meanwhile are stored and answered once it arrives. That is a strict improvement on lockToVersion, which throws on session create and is swallowed on the append path, leaving the chat hung with no run at all. PENDING_VERSION is non-final, so the parked run is reused rather than re-triggered.

The session-create and .in/append responses now report pendingVersion, and the transport emits a matching event, so the wait can read as a deploy in progress instead of a stall:

// app/components/chat.tsx
const transport = useTriggerChatTransport<typeof myChat>({
  task: "my-chat",
  accessToken: ({ chatId }) => mintChatAccessToken(chatId),
  startSession: ({ chatId, clientData }) => startChatSession({ chatId, clientData }),
  onEvent: (event) => {
    if (event.type === "run-pending-version") setDeploying(true);
    if (event.type === "first-chunk") setDeploying(false);
  },
});

Escaping the pin

chat.requestUpgrade() re-applied the stored pin, which made upgrading away from a pinned version impossible. It now clears the session's id and persists that, so the next continuation cannot bounce back, and takes a target when you want to move to a specific deployment instead:

// trigger/chat.ts
chat.requestUpgrade({ externalDeploymentId: clientData.commitSha });

lockToVersion is deliberately untouched: it still wins where both are set, and requestUpgrade() still cannot escape it.

Docs: a new Chat sessions section on the version skew protection page, plus notes on the version-upgrades pattern page.

@changeset-bot

changeset-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa56d28

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@trigger.dev/sdk Patch
@trigger.dev/core Patch
@trigger.dev/python Patch
@internal/dashboard-agent Patch
@trigger.dev/build Patch
trigger.dev Patch
@trigger.dev/redis-worker Patch
@trigger.dev/schema-to-json Patch
@internal/clickhouse Patch
@internal/llm-model-catalog Patch
@internal/metrics-pipeline Patch
@trigger.dev/rbac Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/run-store Patch
@internal/schedule-engine Patch
@internal/tracing Patch
@internal/webhook-engine Patch
@internal/webhook-sources Patch
@internal/cache Patch
@trigger.dev/react-hooks Patch
@trigger.dev/rsc Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch
@trigger.dev/sso Patch
@internal/testcontainers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@0ski
0ski marked this pull request as draft August 26, 2026 13:22
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 763f581e-f2d4-474e-b4c8-1703bb5c952c

📥 Commits

Reviewing files that changed from the base of the PR and between b25e79b and fa56d28.

📒 Files selected for processing (1)
  • .changeset/chat-agent-version-skew-protection.md

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (50)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (20, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (21, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (13, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (17, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (22, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (19, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (14, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (18, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (23, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (24, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (16, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (11, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (12, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (15, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 24)
  • GitHub Check: sdk-compat / Node.js 20.20 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: runops-guard / runops-guard
  • GitHub Check: sdk-compat / Node.js 24.18 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: sdk-compat / Node.js 22.23 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-8x - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - npm)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - pnpm)
  • GitHub Check: fk-cascade-guard / fk-cascade-guard
  • GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-8x - pnpm)
  • GitHub Check: sdk-compat / Node.js 26.4 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: obsmap / 🧪 Unit Tests: Observability Map
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (1, 2)
  • GitHub Check: internal / 🧪 Unit Tests: Internal
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (2, 2)
  • GitHub Check: report
  • GitHub Check: code-quality / code-quality
  • GitHub Check: audit
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: 🛡️ E2E Auth Tests (full)
🔇 Additional comments (2)
.changeset/chat-agent-version-skew-protection.md (2)

15-15: State that lockToVersion remains authoritative.

Line [15] says that chat.requestUpgrade() clears the session pin and can move to a specific deployment, but it does not state the lockToVersion exception. When lockToVersion is set, neither clearing the external deployment pin nor passing externalDeploymentId can override it. Update this changeset so users do not interpret requestUpgrade() as an override.


1-6: LGTM!

Also applies to: 8-13


Walkthrough

The change adds external deployment ID support to chat session configuration and API schemas. The SDK resolves deployment IDs, preserves explicit null opt-outs, and forwards trigger options. Session runs retain deployment pins across continuations and upgrades, expose pending-version state, and emit run-pending-version events. The web application propagates and persists deployment pins. Tests cover schemas, SDK resolution, session orchestration, upgrades, and pending-version events. Documentation and changesets describe the new behavior.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 24 functions across 18 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: version skew protection for chat.agent sessions. It also identifies the affected areas.
Description check ✅ Passed The description is detailed, on-topic, and explains deployment ID resolution, parked runs, pending-version reporting, upgrade behavior, compatibility with lockToVersion, and documentation changes. It …
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 24 functions across 18 files. (1 skipped: 1 unsupported.)

Full details: Description check

Explanation

The description is detailed, on-topic, and explains deployment ID resolution, parked runs, pending-version reporting, upgrade behavior, compatibility with lockToVersion, and documentation changes. It does not include the template's issue reference, checklist, explicit Testing section, Changelog section, or Screenshots section, but the core change information is complete.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch oskar/feat-chat-agent-version-skew-protection

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

coderabbitai[bot]

This comment was marked as resolved.

@0ski
0ski force-pushed the oskar/feat-chat-agent-version-skew-protection branch from 8ec56c3 to 847175f Compare August 26, 2026 14:17
@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@fa56d28

trigger.dev

npm i https://pkg.pr.new/trigger.dev@fa56d28

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@fa56d28

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@fa56d28

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@fa56d28

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@fa56d28

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@fa56d28

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@fa56d28

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@fa56d28

commit: fa56d28

@0ski
0ski marked this pull request as ready for review August 26, 2026 14:21
coderabbitai[bot]

This comment was marked as resolved.

@0ski
0ski force-pushed the oskar/feat-chat-agent-version-skew-protection branch from 847175f to b25e79b Compare August 26, 2026 14:35

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Open in Devin Review

Comment on lines +528 to +537
const winner = await runStore.findRun(
{ id: fresh.currentRunId },
{ select: { status: true } },
prisma
);

return {
runId: fresh.currentRunId,
swapped: false,
pendingVersion: winner ? isPendingVersionStatus(winner.status) : false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Unused database read in preempted swap path

The lost-race branch of swapSessionRun issues an extra runStore.findRun on the winning run only to compute pendingVersion. The sole caller, the end-and-continue route, discards that field, so each preempted upgrade makes a database round-trip whose result nothing reads.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.changeset/chat-agent-version-skew-protection.md (1)

8-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add temporary crumb markers to every new code example.

Both files add code examples without the required crumb instrumentation.

  • .changeset/chat-agent-version-skew-protection.md#L8-L13: add a crumb marker to the TypeScript example.
  • docs/deployment/version-skew-protection.mdx#L287-L295: add a crumb marker to the session-start example.
  • docs/deployment/version-skew-protection.mdx#L303-L313: add a crumb marker to the transport example.
  • docs/deployment/version-skew-protection.mdx#L321-L325: add a crumb marker to the opt-out example.
  • docs/deployment/version-skew-protection.mdx#L333-L335: add a crumb marker to the upgrade example.

As per coding guidelines, **/* files must add crumbs while code is written.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 01a6d9b1-93db-4d74-92ea-054afb1565ed

📥 Commits

Reviewing files that changed from the base of the PR and between 847175f and b25e79b.

📒 Files selected for processing (2)
  • .changeset/chat-agent-version-skew-protection.md
  • docs/deployment/version-skew-protection.mdx

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📜 Review details
⏰ Context from checks skipped due to timeout. (42)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (24, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (14, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (16, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (22, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (23, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (15, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (21, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (20, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (19, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (17, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (11, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (13, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (18, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (12, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 24)
  • GitHub Check: sdk-compat / Node.js 22.23 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-8x - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-8x - pnpm)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - npm)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (2, 2)
  • GitHub Check: internal / 🧪 Unit Tests: Internal
  • GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
  • GitHub Check: runops-guard / runops-guard
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (1, 2)
  • GitHub Check: code-quality / code-quality
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: 🛡️ E2E Auth Tests (full)
  • GitHub Check: 🛡️ E2E Auth Tests (full)
  • GitHub Check: Build and publish previews
🧰 Additional context used
📓 Path-based instructions (2)
Add crumbs as you write code — not just when debugging. Mark lines with

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • docs/deployment/version-skew-protection.mdx
MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format

📄 CodeRabbit inference engine (docs/CLAUDE.md)

Files:

  • docs/deployment/version-skew-protection.mdx
🧠 Learnings (1)
📚 Learning: 2026-04-30T20:30:29.458Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3226
File: docs/ai-chat/quick-start.mdx:13-13
Timestamp: 2026-04-30T20:30:29.458Z
Learning: In this repo’s documentation MDX files (`docs/**/*.mdx`), use `ts` and `tsx` (not `typescript`) as the code-fence language tags for TypeScript/TSX snippets. Do not flag `ts`/`tsx` code-fence language tags as incorrect in any docs MDX file, since this is the site-wide Mintlify-compatible convention.

Applied to files:

  • docs/deployment/version-skew-protection.mdx
🔇 Additional comments (2)
.changeset/chat-agent-version-skew-protection.md (1)

1-6: LGTM!

docs/deployment/version-skew-protection.mdx (1)

279-285: LGTM!

Also applies to: 297-301, 315-317, 329-331, 336-338

});
```

Messages sent while a chat waits on a deployment that is still building are stored and answered once it lands, and the transport emits a `run-pending-version` event so your UI can say so. `chat.requestUpgrade()` now clears the session's pin so the handoff can reach a new version, and accepts `{ externalDeploymentId }` to move to a specific one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep external deployment pinning distinct from lockToVersion.

The documentation overstates what external deployment opt-out and chat.requestUpgrade() can change.

  • .changeset/chat-agent-version-skew-protection.md#L15: state that chat.requestUpgrade() cannot override lockToVersion.
  • docs/deployment/version-skew-protection.mdx#L317-L327: clarify that these options disable external-deployment pinning only; they do not override lockToVersion.

The PR objective states that lockToVersion remains authoritative and cannot be overridden.

📍 Affects 2 files
  • .changeset/chat-agent-version-skew-protection.md#L15-L15 (this comment)
  • docs/deployment/version-skew-protection.mdx#L317-L327

0ski added 2 commits August 26, 2026 16:56
A chat session now carries an external deployment id, so every run it
schedules lands on the deployment that matched the app build that
started the conversation: the first run, each continuation after an idle
suspend, and each recovery after a crash.

Public SDK surface:

- `triggerConfig.externalDeploymentId`, on every entry point that starts
  a session (`sessions.start`, `chat.createStartSessionAction`,
  `chat.headStart`, `chat.handover`, `AgentChat`). Normally omitted: it
  is discovered wherever the session is started, with the same
  precedence `trigger()` uses. `null` opts one chat out.
- `pendingVersion` on the session-create and `.in/append` responses, on
  `ChatStartSessionResult` and on `StartSessionResult`, plus a new
  `run-pending-version` transport event, so a chat waiting on a
  deployment that is still building can say so instead of appearing to
  stall.
- `chat.requestUpgrade({ externalDeploymentId })`. Called without a
  target it now clears the session's pin, which is what makes upgrading
  away from a pinned version possible at all, and the cleared pin is
  persisted so the next continuation cannot bounce back.
- `SessionTriggerConfigInput` and `CreateSessionInput`, the caller-facing
  forms of the trigger config and the create body.

Parking is the right failure mode here, and an improvement on
`lockToVersion`, which throws on session create and is swallowed on the
append path, leaving the chat hung with no run at all. `PENDING_VERSION`
is non-final, so a parked run is reused rather than re-triggered and
appended messages stay durable until the deployment lands.

`lockToVersion` is deliberately untouched: it still wins where both are
set, and `requestUpgrade()` still cannot escape it.
`AgentChat.ensureStarted` built its session config field by field and
never copied these three across, so anyone who set them on
`triggerConfig` got no error and no effect.
@0ski
0ski force-pushed the oskar/feat-chat-agent-version-skew-protection branch from b25e79b to fa56d28 Compare August 26, 2026 14:56
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