Commit Graph

8 Commits

Author SHA1 Message Date
roboomp 181f63ebc0 fix(coding-agent): detect non-English questions in todo reminder guard
The isAwaitingUserAnswer guard that suppresses the todo completion reminder while the agent waits on a user question only recognized English question words and pronouns. A '?'/'?'-terminated Chinese, Japanese, Korean, or Spanish prompt went undetected, so the <system-reminder> interrupted the pause and the model misread it as the user's answer.

isQuestionPromptLine now also treats a question-mark-terminated line containing any non-ASCII character as a pending user question.

Fixes #7803
2026-08-06 06:47:27 +00:00
can1357 46ad908245 fix(coding-agent): renamed settings keys to avoid nested-value lookup collisions
- Updated schema and runtime paths to use `dev.autoqaConsent` and `todo.remindersMax`, including auto-QA consent reads/persistence and todo reminder limit checks.
- Adjusted settings expectations so obsolete BM25-discovery keys were dropped on load and `tools.xdev` now kept its default unless explicitly set.
- Added/updated tests for the setting key migration and refreshed issue-consent flows, plus a new `refreshMCPTools` test for steered `xdev-mount-notice` updates without prompt rebuilds.
2026-07-15 19:08:37 +02:00
can1357 82327af420 fix(coding-agent): require terminal user prompt for todo suppression 2026-07-14 18:45:03 +02:00
roboomp 3617668c68 fix(coding-agent): narrowed todo question detection
- Required prompt-shaped question lines or explicit response cues before suppressing stop-time todo reminders.
- Covered incidental answer prose and TypeScript optional-property syntax so incomplete todos still remind.

Fixes #5089
2026-07-10 15:59:33 +00:00
roboomp 6b6471c866 fix(coding-agent): suppressed todo reminders for questions
- Skipped stop-time todo reminders when the assistant is yielding to the user with a text-only question.
- Added regression coverage that keeps ordinary text-only reminder behavior intact while interactive questions stay silent.

Fixes #5089
2026-07-10 15:28:50 +00:00
roboomp 75d8d97220 fix(session): persisted todo reminder injections
Recorded todo reminder developer messages in the session log so JSONL transcripts match model-visible context when reminders are enabled.\n\nFixes #2824
2026-06-17 03:49:55 +00:00
roboomp 3ae02cae47 fix(coding-agent): used TextContent in todo reminder regression test
`ToolResultContent` is not exported from `@oh-my-pi/pi-ai`; `ToolResultMessage.content` is `(TextContent | ImageContent)[]`. Test only needs text, so type the content array as `TextContent[]`.
2026-06-14 22:04:31 +00:00
roboomp 3501a8e93c fix(coding-agent): stopped todo reminders self-escalating without user input
`#checkTodoCompletion` used to append a `<system-reminder>` and then call
`#scheduleAgentContinue`, so a text-only acknowledgement ("paused at your
instruction") triggered another `agent_end` that re-ran the same check and
fired the next reminder — counter ticked 1/3 → 2/3 → 3/3 inside a single user
pause without any user input. The user perceived three back-to-back reminders
appear from nowhere; the agent felt implicit pressure to invent busy-work or
take destructive ops to silence the loop.

Added `#todoReminderAwaitingProgress`: a reminder sets it, any `toolResult`
(real tool-level progress) or a new user prompt clears it, and
`#checkTodoCompletion` stays silent while it is set. Reset alongside
`#todoReminderCount` on user prompts, session reset, handoff, and the no-op
short-circuits in `#checkTodoCompletion` so the field never gets stuck.
Escalation through `todo.reminders.max` still works when the agent makes
tool-level progress between stops — that is the case the cap was designed for.

Regression coverage in `agent-session-todo-reminder-loop.test.ts` drives a
mocked `agent.continue` to mirror the bug-reported model behaviour and pins
the contract: exactly one reminder per user pause when the agent only
acknowledges; re-escalation when the agent actually calls a tool between stops.

Fixes #2590
2026-06-14 22:03:31 +00:00