Skip to content

Keep pending prompts safe across delayed starts and resets - #273

Open
dnouri wants to merge 2 commits into
masterfrom
fix/prompt-ownership-settlement
Open

Keep pending prompts safe across delayed starts and resets#273
dnouri wants to merge 2 commits into
masterfrom
fix/prompt-ownership-settlement

Conversation

@dnouri

@dnouri dnouri commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

Keep locally owned prompts intact until Pi has authoritatively settled them.

  • A delayed agent_start is no longer treated as an invisible no-turn command merely because 0.5 seconds elapsed. The fallback queries get_state; active turns remain pending, while an authoritative idle response releases the prompt.
  • When an extension handles a prompt without starting an agent turn, the speculative local user turn is retracted and queued follow-ups can continue.
  • Starting a new session now owns a guarded session transition immediately. It refuses unresolved prompt acceptance and queued follow-ups instead of silently discarding them.
  • Deliberate reset while Pi is already streaming remains supported.
  • Reset and state-refresh error paths release their transition guards reliably.

These are shared text-prompt lifecycle fixes extracted from the review of #271. That image-attachment PR is stacked on this one because it reuses the same ownership guarantees for image-bearing turns.

Verification

  • make check — 1,662 tests, one compatibility skip, no unexpected results
  • Full input, UI, and menu suites passed
  • Focused no-turn, delayed-start, process-exit, and session-reset checks passed
  • git diff --check passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant