Skip to content

Strengthen local agent execution - #22

Merged
jadercorrea merged 1 commit into
mainfrom
publish/gptcode-site
Jul 28, 2026
Merged

Strengthen local agent execution#22
jadercorrea merged 1 commit into
mainfrom
publish/gptcode-site

Conversation

@jadercorrea

Copy link
Copy Markdown
Owner

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

  • ground deep research in repository files while rejecting path and symlink escapes;
  • let the editor complete planned multi-file changes and use ranged file reads;
  • force bounded, explicit review verdicts after deterministic verification;
  • propagate --max-attempts into the internal conductor;
  • terminate full subprocess trees when agent commands are cancelled;
  • fall back to the embedded model catalog for clean local installations;
  • report observed local-model calls and tool timing without false precision;
  • isolate nested Git operations from the parent repository during commit hooks;
  • remove the disconnected legacy monitor and imperative release commands.

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

  • complete Ollama/Qwen repair workflow: success in approximately 48 seconds;
  • make verify;
  • go test -race ./...;
  • go vet ./...;
  • staticcheck ./...;
  • gosec -quiet ./...;
  • public examples pass the race detector and enforce 100% statement coverage;
  • regression coverage for repository evidence, model fallback, planned files, bounded review, process cancellation, telemetry, and Git hook isolation.

Follow-up

Instrument every model stage through one provider wrapper, then isolate the remaining Live, training, Supabase, and experimental surfaces behind explicit compatibility boundaries.

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
jadercorrea marked this pull request as ready for review July 28, 2026 16:43
@jadercorrea
jadercorrea merged commit 8842331 into main Jul 28, 2026
1 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