Strengthen local agent execution - #22
Merged
Merged
Conversation
Local execution previously depended too much on model behavior. Research could invent causes without reading the repository, editors could stop before completing a plan, reviewers could loop after tests passed, and retry limits did not bound the full workflow. This made local models cheaper to run, but not trustworthy. Turn the workflow into an evidence-driven execution pipeline. Research is grounded in repository files, editors can complete planned multi-file changes, reviews end with an explicit verdict, deterministic checks remain authoritative, and caller attempt budgets control the internal conductor. Agent commands now propagate cancellation through their full process trees. Validate the result with a complete Ollama/Qwen run: diagnose an incorrect Go implementation, plan the repair, apply the patch, pass go test ./..., and finish model review without paid inference. Regression tests cover evidence boundaries, model fallback, ranged reads, planned files, process cancellation, telemetry, and Git isolation inside commit hooks. Make the maintained CLI tell the same story. Local-model telemetry no longer claims calls or token precision it cannot observe, stale monitor and imperative release commands are removed, and the public workflow remains protected by the repository quality contract. A future change should instrument every model stage through one provider wrapper and isolate the remaining experimental surfaces.
jadercorrea
marked this pull request as ready for review
July 28, 2026 16:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Local execution was inexpensive but not yet trustworthy enough to demonstrate the GPTCode thesis. Research could infer root causes without repository evidence, editors could stop before completing a plan, reviewers could keep requesting tools after deterministic checks passed, retry limits did not bound the complete workflow, and cancellation could leave child processes running.
The maintained CLI also carried disconnected hosted-product commands and reported local-model metrics with more precision than the provider supplied.
What changed
--max-attemptsinto the internal conductor;monitorand imperativereleasecommands.User impact
GPTCode can now complete a controlled workflow with Ollama/Qwen without paid inference: inspect repository evidence, identify an incorrect Go implementation, plan the change, apply the patch, pass
go test ./..., and finish model review within a caller-defined attempt budget.This makes the local-first path useful for repeated evaluation and gives the project a stronger, auditable demonstration of its architecture.
Evidence
make verify;go test -race ./...;go vet ./...;staticcheck ./...;gosec -quiet ./...;Follow-up
Instrument every model stage through one provider wrapper, then isolate the remaining Live, training, Supabase, and experimental surfaces behind explicit compatibility boundaries.