11 Commits
Author SHA1 Message Date
Alessandro 039efe4198 Keep model prose as thoughts and retry silently
Preserve free text and reasoning-only output in the current generation
and retry without intermediate warning rows. Require an explicit response
tool call to finish in both API modes, including after provider built-in
actions.

Keep history metadata, Responses state, tool validation and the
consecutive-failure stop intact. Allow core retries when Context Doctor
and its prompts are unavailable.

Validation: 411 backend tests and 2 Chromium live/replay grouping tests
passed; live runtime health check passed.
2026-11-01 06:50:49 +01:00
Alessandro 345571ca0e Restore Context Doctor repair before retrying malformed calls
Let unconverted alternate-format output reach Context Doctor's existing JSON
repair path. Remove the leaked-call rejection state, retry hook and prompts
so missing delimiters and other repairable output can execute in the same
turn, restoring the behavior from before PR #1920.

Keep complete XML/DSML/native-text conversion, normal tool permissions,
Context Doctor's XML history cleanup and existing output-limit handling.
Update integration tests and ownership documentation for the restored flow.

Validation: 504 targeted tests passed both locally and in the Docker framework
runtime, including actual agent-loop tests for missing brackets and braces.
Historical comparisons matched pre-PR behavior in 48 cases and confirmed
12 additive format-conversion cases. Restarted the local runtime and verified
its health and extension discovery.
2026-10-27 22:19:53 +01:00
Alessandro 1373009168 Simplify leaked tool recovery and log completed responses 2026-10-23 18:18:56 +02:00
lazy 3a2e26981a Fix leaked tool-call recovery before result dispatch 2026-10-23 17:58:23 +02:00
Alessandro 505c0b4dc6 Clear scheduler errors after successful chat continuation
Failed scheduler tasks stayed in Error when their chats resumed outside the
scheduler runner, even after successful replies and a persistence reload.

Persist the owning task UUID in chat context data and reconcile successful
main-agent monologues with the associated errored task. Save Idle, the
recovered result and its completion timestamp through a checked update.
Preserve planned launch progression, normal retry callbacks and unrelated,
disabled, removed or reassigned tasks. Legacy dedicated chats resolve by
context ID; legacy shared chats still require an explicit scheduler retry.

Add regression coverage for failure, restoration, two successful chat steps,
all task types, JSON/YAML persistence, cancellation and ownership guards.
Update the scheduler and extension contracts.

Validation: 31 scheduler tests passed in the localhost:32081 container's
framework runtime. Broader lifecycle checks: 65 passed, with one unrelated
nudge fixture failure reproduced with reconciliation disabled. No live
provider/model-switch test or service restart.
2026-10-21 14:19:51 +02:00
Alessandro 32aa95e8dd Preserve native Responses history within prepared prompts
Project intact call/result groups from the current prepared local Responses
input, retaining original IDs and encrypted reasoning. Bind replay to the
visible prefix and tool scope; preserve summaries, masking, protocol, extras
and untouched Chat/fallback input. Keep request conversion in Responses helpers.

Recover output items omitted by terminal stream envelopes and keep native
call commentary out of plain-response finalization. Do not rewrite stored
chats or change tool execution policy.

Validation: 1632 root tests passed, one skipped; framework prepared-prompt
probe passed. Live Codex and Venice presets completed terminal calls, native
replay advanced from three to four calls, and the viewer reported 57% cache hit.
2026-09-06 22:08:21 +02:00
Alessandro cb39a16c24 Optimize realtime WebUI synchronization
Negotiate collection deltas and preserve sidebar row identity so high-rate log streams avoid resending and reconciling unchanged state. Bound streamed log fields, defer expensive response formatting until completion, update capped process groups only for new steps, and keep disconnect and terminal task state accurate. Add focused lifecycle, snapshot, sync, and WebUI regressions.
2026-08-26 15:27:36 +02:00
Alessandro d1a9bfa13e Scope settings snapshots to prompt builds
Reuse one normalized settings snapshot only while Agent.prepare_prompt builds a prompt, then restore normalize-on-read behavior immediately.

Keep the canonical get_settings function unchanged while prompt-building callers explicitly avoid repeated Git and default resolution.
2026-08-23 06:08:41 +02:00
Alessandro d33cac3bf3 Stop runaway unusable response loops
Add a configurable circuit breaker for consecutive malformed or repeated model outputs. Expose the limit in Agent Settings and render the stop notice from a framework prompt.
2026-07-10 16:36:30 +02:00
Alessandro 48087de008 Render plain Responses completions
When Responses mode accepts a plain-text final answer, reuse the active generating log item as a finished response entry so the WebUI does not remain on the Calling LLM step.

Skip normal tool JSON and existing live response-tool logs, and cover the fallback with focused regression tests.
2026-06-26 15:00:02 +02:00
frdel e138e33ca9 Add file-level DOX docs & update AGENTS indexes
Add comprehensive file-level DOX documentation across the repo and update directory AGENTS.md indexes. Many new `*.py.dox.md` files were added under api, helpers, tools, plugins, extensions, webui, and other dirs to document endpoint purpose, ownership, runtime contracts, work guidance, and verification. Several AGENTS.md files were created or updated (agents profiles, api, docker, extensions, helpers, plugins, skills, webui components, etc.) to list child DOX files and clarify documentation/work guidance. Also add example and bundled profile DOX files (agent0, default, developer, hacker, researcher) and minor updates to helpers/dirty_json.py and its tests. These changes improve on-disk documentation coverage and establish the convention that each direct runtime file should have a matching `*.dox.md` describing its contracts and verification steps.
2026-06-08 12:41:53 +02:00