mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
A new session was only written to disk once the first assistant message existed. If pi exited during the first turn (Ctrl+C twice while streaming, or the process was killed), the user's prompt was lost and the session never appeared in /resume. The file is now created as soon as the session has a user or assistant message. A session with only setup entries (model, thinking level) still stays in memory, so starting pi and quitting without chatting leaves no file. Forking uses the same rule through a shared helper, so the two paths cannot drift apart and write the header twice (#1672). closes #10000 |
||
|---|---|---|
| .. | ||
| regressions | ||
| agent-session-bash-persistence.test.ts | ||
| agent-session-boundaries.test.ts | ||
| agent-session-compaction-model-overrides.test.ts | ||
| agent-session-compaction.test.ts | ||
| agent-session-model-extension.test.ts | ||
| agent-session-prompt.test.ts | ||
| agent-session-queue.test.ts | ||
| agent-session-retry-events.test.ts | ||
| agent-session-runtime.test.ts | ||
| agent-session-tool-result-images.test.ts | ||
| harness.ts | ||
| lax-message-content.test.ts | ||
| README.md | ||
Coding agent suite tests
Use test/suite/ for the new harness-based test suite around AgentSession and AgentSessionRuntime.
Rules:
- Use
test/suite/harness.ts - Use the faux provider from
packages/ai/src/providers/faux.ts - Do not use real provider APIs, real API keys, network calls, or paid tokens
- Keep these tests CI-safe and deterministic
- Do not use or extend the legacy
test/test-harness.tspath unless a missing capability forces it