Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#1,973 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, node.js, sqlite

Línea de trabajo

Comienza con la configuración reproducida de server.mjs y client.mjs, y luego ejecuta el runtime nativo local aislado usando las versiones de los paquetes indicadas y la revisión oficial del ejemplo de Pi. Inspecciona la ruta de transacción del almacenamiento de sesión alrededor de la consulta agentos_fs_metadata_chunks reportada y de la expiración del lease de 30 segundos. Se considera completado cuando el prompt devuelve end_turn, escribe PI_ACTOR_OK y la sesión completada puede reanudarse.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
4.8k
Forks
266
Merge medio
12 h 10 min
PR fusionados (30 d)
36

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rivet-dev/agentos

Todos los issues de rivet-dev/agentos

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.