pi-mono/packages
David Brailovsky a447ba11f3
fix(coding-agent): emit before_agent_start for runs started by custom messages (#10739)
Runs started by pi.sendMessage(..., { triggerTurn: true }) skipped before_agent_start. After their first tool call, the next-turn refresh fell back to the base prompt options and patched away the sections handlers had added, changing the system prompt mid-run and breaking the provider prompt cache.

These runs now go through the same setup as prompt(): compaction check, before_agent_start, tool loadout, nextTurn messages, handler messages, and the system patch. BeforeAgentStartEvent is a union on messageType ("user" or "custom"); custom events carry the starting message.

The session counts as busy from the start of setup, so messages sent while handlers run go into the starting run instead of starting a second one, and an abort requested meanwhile aborts the run once it starts.

closes #10267, closes #5581, closes #10639, closes #10289
partly fixes #10606
2026-10-12 09:53:24 +02:00
..
agent Add [Unreleased] section for next cycle 2026-10-07 23:33:49 +02:00
ai fix(ai): send the codex request body as a Uint8Array<ArrayBuffer> copy 2026-10-11 16:35:13 +00:00
chord fix(chord): append to arrays without walking or copying them twice 2026-10-11 18:04:43 +00:00
client Add [Unreleased] section for next cycle 2026-10-07 23:33:49 +02:00
codemode refactor(codemode,coding-agent): decouple MCP from codemode 2026-10-12 09:19:30 +02:00
coding-agent fix(coding-agent): emit before_agent_start for runs started by custom messages (#10739) 2026-10-12 09:53:24 +02:00
durable fix(durable): drop shared MCP types from the codemode section 2026-10-12 09:21:04 +02:00
env feat(env): report a terminal's foreground job with ptyForeground 2026-10-11 16:35:08 +00:00
evals Release v1.1.0 2026-10-07 23:33:33 +02:00
mcp fix(mcp): reject iss when no authorization server metadata was discovered 2026-10-10 14:44:35 +02:00
protocol Add [Unreleased] section for next cycle 2026-10-07 23:33:49 +02:00
server Add [Unreleased] section for next cycle 2026-10-07 23:33:49 +02:00
telemetry Add [Unreleased] section for next cycle 2026-10-07 23:33:49 +02:00
tui fix(tui): enable kitty images in herdr (#10774) 2026-10-11 22:01:02 +02:00