Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Pi file-writing turn fails with Actor SQLite transaction timeout on local native runtime

Đang mở
#1,973 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, node.js, sqlite
Lĩnh vực
backend, databases

Hướng nghiên cứu

Bắt đầu với thiết lập server.mjs và client.mjs đã tái hiện, sau đó chạy runtime native cục bộ biệt lập bằng các phiên bản package được liệt kê và revision chính thức của ví dụ Pi. Kiểm tra đường dẫn giao dịch session-storage xung quanh query agentos_fs_metadata_chunks đã được báo cáo và thời điểm lease 30 giây hết hạn. Được xem là hoàn tất khi prompt trả về end_turn, ghi PI_ACTOR_OK và session đã hoàn tất có thể được tiếp tục.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

A minimal Pi file-writing prompt fails with session_storage_error and an Actor SQLite transaction timeout on the local native runtime. This reproduces outside our application, using published packages without patches or overrides.

The official Pi quickstart directory-listing prompt succeeds in 8.7 seconds. Asking Pi to write one small file fails, including as the first prompt on a fresh actor. Direct filesystem.writeFile/readFile calls worked in earlier checks; the failing operation is the complete agent turn and its durable session storage.

Environment

  • macOS, Apple Silicon; Node.js 24.19.0
  • @rivet-dev/agentos: 0.2.19
  • @rivet-dev/agentos-core: 0.2.19, supplied by agentOS
  • @agentos-software/pi: 0.2.7
  • rivetkit and local Engine: 2.3.10, matching agentOS dependencies
  • Anthropic credential supplied through sessions.open({ env })
  • Local native actor runtime, not Rivet Cloud and not embedded Core

Reproduction

In a new directory, initialise a private ESM package and install:

pnpm add @rivet-dev/[email protected] @agentos-software/[email protected] [email protected]

server.mjs, matching the official Pi server example:

import { agentOS, setup } from '@rivet-dev/agentos';
import pi from '@agentos-software/pi';

const vm = agentOS({ software: [pi] });
export const registry = setup({ use: { vm } });
registry.start();

Start with isolated local storage and a free port:

RIVET_RUN_ENGINE=1 RIVET_RUN_ENGINE_HOST=127.0.0.1 RIVET_RUN_ENGINE_PORT=6720 RIVET_RUN_SERVICES=0 RIVETKIT_STORAGE_PATH="$PWD/data" node server.mjs

No inherited remote Rivet endpoint or custom sidecar override was present. The server reports http://127.0.0.1:6720 (local native) and one actor.

client.mjs, with ANTHROPIC_API_KEY set in its environment:

import { createClient } from '@rivet-dev/agentos/client';

const client = createClient({ endpoint: 'http://127.0.0.1:6720' });
const agent = client.vm.getOrCreate('fresh-write');
try {
  if (!process.env.ANTHROPIC_API_KEY) throw new Error('Missing key');
  await agent.sessions.open({
    agent: 'pi',
    env: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY },
  });
  const result = await agent.sessions.prompt({
    content: [{ type: 'text', text:
      'Write /home/agentos/proof.txt containing exactly PI_ACTOR_OK.' }],
  });
  console.log(result.stopReason);
  if (result.stopReason !== 'end_turn') throw new Error('Turn did not complete');
  console.log(new TextDecoder().decode(
    await agent.filesystem.readFile('/home/agentos/proof.txt')));
} finally {
  await client.dispose();
}

Actual result

The fresh session opens in about one second. The prompt fails:

session_storage_error: actor SQLite UDS failed:
actor SQLite UDS transaction lease expired after 30000ms:
SQLite transaction expired after 30000 ms and was rolled back.

A further test retained agent.connect(), received live sessionEvent tool updates, explicitly set permissionPolicy: 'allow_all', used a single-write prompt, and configured options: { sleepTimeout: 10 * 60_000 } on the server. It still failed on a fresh actor. No vmShutdown event arrived before the failure. That server logged:

slow sqlite transaction duration_ms=30002 statement_count=3 commit_round_trips=0
operation=execute
sql="SELECT COALESCE(MAX(generation), 0) FROM agentos_fs_metadata_chunks WHERE namespace = ?"
code=transaction_expired

The client reported session_storage_error: actor SQLite UDS connection generation closed: request deadline expired in that variant.

Expected result

The turn returns end_turn, the file contains PI_ACTOR_OK, and the completed session can be resumed. Is there a required local-runtime setting or supported package combination missing from this setup?

Reference: official Pi example at the 0.2.19 source revision.

Ngôn ngữ chính
Rust
Star
4.8k
Fork
272
Merge trung bình
13 giờ 24 phút
Pull request đã merge (30 ngày)
49

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rivet-dev/agentos

Tất cả issue của rivet-dev/agentos

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.