pi-mono/packages/coding-agent/test/suite
Armin Ronacher aef5fc429b
fix(coding-agent): keep prompt and tool state across context handlers (#9846)
Since 0.86 the prompt and tool declarations live in transcript system
messages, so a context handler that filters or slices messages could drop
them. After extension-driven compaction this sent requests without built-in
tools and made Codex emit raw tool-call text.

context handlers now see the conversation only. An unchanged list keeps the
transcript as is; a changed list gets the replayed prompt sections and tool
declarations as one leading system message. Handler-added system messages
are kept after it.

Add context_with_system, which runs after every context handler on the full
transcript and sends its result verbatim, for extensions that need to edit
system messages per request. Dropping the leading system message is reported
as an extension error.

closes #9789, closes #9822
2026-09-21 17:14:22 +02:00
..
regressions fix(coding-agent): keep prompt and tool state across context handlers (#9846) 2026-09-21 17:14:22 +02:00
agent-session-bash-persistence.test.ts Mid conversation system messages (#9548) 2026-09-16 15:54:07 +02:00
agent-session-boundaries.test.ts feat: add canonical session context boundaries 2026-09-21 16:59:20 +02:00
agent-session-compaction-model-overrides.test.ts feat(coding-agent): support per-model compaction token budgets 2026-09-10 08:37:20 +02:00
agent-session-compaction.test.ts fix(coding-agent): compact oversized trailing tool results 2026-09-18 13:38:30 +02:00
agent-session-model-extension.test.ts feat(agent): add Pico storage foundation 2026-09-18 12:32:00 +02:00
agent-session-prompt.test.ts feat(ai,coding-agent): add image input limits (closes #9631) 2026-09-20 22:59:16 +02:00
agent-session-queue.test.ts Mid conversation system messages (#9548) 2026-09-16 15:54:07 +02:00
agent-session-retry-events.test.ts fix(coding-agent): close compaction cancellation races 2026-09-19 19:18:18 +02:00
agent-session-runtime.test.ts Mid conversation system messages (#9548) 2026-09-16 15:54:07 +02:00
agent-session-tool-result-images.test.ts feat(ai,coding-agent): add image input limits (closes #9631) 2026-09-20 22:59:16 +02:00
harness.ts feat(ai,coding-agent): add image input limits (closes #9631) 2026-09-20 22:59:16 +02:00
lax-message-content.test.ts fix(ai,agent,coding-agent): normalize null message content at ingestion boundaries (#6343) 2026-07-06 20:47:08 +02:00
README.md docs(coding-agent): remove issue-specific regression test placement rule (#8775) 2026-08-28 16:39:28 +02:00

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.ts path unless a missing capability forces it