ai-harness: recovery runs a turn without the user message when the turn never started
メンテナーはふだん 1 日以内に返信
@tombeckenham がすでに取り組んでいます。
2026年10月15日 から。
評価
この issue はまだ評価されていません。
説明
TanStack AI version
@tanstack/ai-harness on the feat/harness-core branch (not released yet).
Framework/Library version
Node 24.8.0. No UI framework: the bug is in the durable host.
Describe the bug and the steps to reproduce it
A durable host (stores.log) stores a prompt in the log, then stops before the turn starts (before it writes its run lease). The next host that opens the thread recovers the input and runs the turn. But the transcript has no user message for that input, so the model gets an empty message list.
Expected: the transcript is ['First.', 'One.']. Actual: ['One.'], and the model call has no messages.
Steps:
- Open a durable host whose
runs.createOrResumenever returns, so the turn never starts. - Send
prompt('First.')and wait for the receipt. - Stop the host's claim renewal, and wait until the claim expires.
- Open the thread on a second host. It recovers the input and calls the model.
- Read
transcript()on the second host.
Found during the review of #1780. That PR is not the cause: the same test fails on feat/harness-core before #1780.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
A test in packages/ai-harness/tests/:
import { expect, it, vi } from 'vitest'
import { memoryLogStore, memoryPersistence } from '@tanstack/ai-persistence'
import { createHarnessHost, defineHarness } from '../src'
import { mockAdapter, text } from './helpers'
it('recovery keeps the user message of a turn that never started', async () => {
const { runs, metadata, workClaims } = memoryPersistence().stores
const persistence = {
stores: { log: memoryLogStore(), runs, metadata, workClaims },
}
const { adapter, calls } = mockAdapter([() => text('One.')])
const harness = defineHarness({ name: 'probe', adapter })
const owner = await createHarnessHost({
lease: { ttlMs: 200, renewMs: 50 },
persistence: {
stores: {
...persistence.stores,
runs: Object.assign(Object.create(runs), {
createOrResume: () => new Promise(() => {}),
}),
},
},
}).open(harness, { threadId: 't1' })
await owner.prompt('First.').receipt
;(owner as unknown as { stopClaimTimer: () => void }).stopClaimTimer()
await new Promise((resolve) => setTimeout(resolve, 300))
const next = await createHarnessHost({ persistence }).open(harness, {
threadId: 't1',
})
await vi.waitFor(() => expect(calls).toHaveLength(1), { timeout: 3_000 })
await new Promise((resolve) => setTimeout(resolve, 200))
expect((await next.transcript()).map((message) => message.content)).toEqual([
'First.',
'One.',
])
})
Do you intend to try to help solve this bug with your own PR?
Maybe, I'll investigate and start debugging
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- 主要言語
- TypeScript
- スター
- 3.2k
- フォーク
- 365
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 261
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/ai のほかの issue
-
withPersistence does not save activity rows when a run is stopped or fails対応中かも @tombeckenham が 1 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
Activity events that a chat middleware emits are streamed but never recorded or persisted対応中かも @AlemTuzlak が 1 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
withPersistence stores the durability batch hint on a stopped or failed assistant message対応中かも @tombeckenham が 1 日前に担当しました。 オープンhas-pr waiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
Activity events that a chat middleware emits are streamed but never recorded or persisted対応中かも @AlemTuzlak が 1 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
withPersistence stores the durability batch hint on a stopped or failed assistant message対応中かも @tombeckenham が 1 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
anomalyco/opencode#56380 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
BUG | `MCP 服务器` | 全局层行的停用/启用与删除报 404 server row not found,编辑保存会在 profile 层复制出重复行対応中かも @w6242652 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Chocobozzz/PeerTube#7832 ·
メンテナーはふだん 3 日以内に返信
-
Pay to use?オープン
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
darkreader/darkreader#16108 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信