InfinitySnap is a supervised autonomous code-fixing system with explicit policy enforcement, verification, rollback, and full replayability.
InfinitySnap wraps the Cline CLI inside a strict, auditable control loop designed for correctness, transparency, and restraint β unlike blind automation.
Correctness > speed
Transparency > magic
Most autonomous βauto-fixβ tools:
- silently modify code
- apply unverified changes
- fail without explanation
- cannot be audited after execution
InfinitySnap is intentionally different.
It treats autonomy as a controlled capability, not a default behavior.
Every fix is:
- confidence-gated
- policy-constrained
- verified deterministically
- recorded step-by-step
Nothing is hidden.
InfinitySnap is not a coding assistant.
It is a supervised autonomous system.
The agent:
- cannot act freely
- cannot bypass policy
- cannot apply unverified changes
- cannot hide failures or reasoning
Judges and reviewers can inspect every artifact.
A single InfinitySnap run follows this lifecycle:
-
Sandbox Execution
Run the command (direct or isolated). -
Failure Analysis
Parse stdout/stderr, stack traces, error signals. -
Confidence Gate
If confidence < threshold β refuse (no edits). -
Supervised Fix (Cline)
Generate a patch under strict policy constraints. -
Verification
Re-run the original command. -
Rollback (if needed)
Failed verification or policy violation β revert. -
Replay & Artifacts
Persist logs, diffs, metrics, and a full timeline.
Developer / CI / Judge
|
v
InfinitySnap CLI (optional)
|
v
Backend API (Express)
|
+-- Sandbox Runner
| - direct mode
| - sandbox copy mode
|
+-- Analyzer
| - error extraction
| - confidence scoring
|
+-- Policy Engine
| - command restrictions
| - patch constraints
|
+-- Cline Executor (supervised)
| - constrained autonomy
|
+-- Verifier
| - deterministic re-run
|
+-- Artifact Store
- logs
- patch / diff
- timeline (txt + json)
Artifacts are stored on disk and served via explicit HTTP endpoints.
There is no hidden state.
InfinitySnap supports two execution modes:
- Runs commands directly in the repository
- Used for demos and trusted code
- No repository copy (
copyMs = 0)
- Copies repository (with excludes)
- Executes in a temporary directory
- Cleanup is timed and logged
The execution mode is always recorded in the timeline.
Before any fix is attempted:
- failure signals are analyzed
- a confidence score is computed
- a threshold is enforced
If confidence is below threshold:
status: refused_low_confidence
- No patch is generated
- No files are touched
This restraint is intentional.
InfinitySnap enforces safety through explicit gates:
- Blocks destructive or unsafe commands
- Optional allowlist enforcement
- Blocks sensitive paths (
.env,.ssh, credentials) - Limits scope of modifications
- Changes persist only if verification passes
- Failure triggers automatic rollback
Every decision is:
- logged
- timestamped
- replayable
InfinitySnap does not directly call OpenAI APIs in its backend logic.
Instead, it delegates reasoning to Cline, operating in ACT mode.
Typical demo configuration (via Cline):
- Provider: OpenAI (native)
- Model:
gpt-5-mini - Mode: ACT (execution-focused)
- Reasoning Effort: medium
- Planning: bounded
- Thinking Budget: capped
Model configuration is explicit and inspectable:
cline config list --output-format jsonInfinitySnap treats the model as a tool, not a decision-maker.
Each run produces complete, inspectable artifacts:
- sandbox stdout / stderr
- analyzer output
- generated patch
- git diff
- verification logs
- execution timeline
GET /api/v1/runs/:id/timelineExample:
[0.00s] fix.start β start
[0.01s] fix.cline β start
[163.35s] fix.cline β ok
[163.51s] fix.verify β start
[164.52s] fix.verify β ok
[164.52s] fix.complete β verified
GET /api/v1/runs/:id/timeline.jsonEnd-to-end execution showing SNAP β ANALYZE β FIX β VERIFY with confidence gating.
Human-readable execution timeline with precise step durations.
All persisted run artifacts (logs, diff, patch, timeline) exposed via API.
infinity-snap/
βββ backend/
β βββ src/
β β βββ analyzer.ts
β β βββ sandboxRunner.ts
β β βββ policy.ts
β β βββ routes.ts
β β βββ timeline.ts
β β βββ runStore.ts
β β βββ verifier.ts
β β βββ start.ts
β βββ .data/
β β βββ runs/
β β βββ logs/
β β βββ diffs/
β β βββ artifacts/
β βββ package.json
β
βββ infinitysnap-dashboard/ # Next.js dashboard UI
β βββ src/
β β βββ app/
β β βββ components/
β β βββ lib/
β βββ package.json
β
βββ cli/
β βββ src/
β β βββ apiClient.ts
β β βββ commands/
β β βββ config.ts
β β βββ ui/
β βββ package.json
β
βββ samples/
β βββ infinitysnap-demo/
β βββ src/
β βββ tests/
β βββ package.json
β
βββ scripts/
β βββ cline.sh
β
βββ README.md
cd backend
npm install
npm run devHealth checks:
curl http://localhost:4000/health
curl http://localhost:4000/api/v1/healthInfinitySnap includes a Next.js dashboard for inspecting runs, timelines, logs, diffs, and artifacts.
cd infinitysnap-dashboard
npm install
npm run devOpen in Browser
http://localhost:3000The dashboard automatically connects to the backend API and provides:
- run list & status overview
- timeline replay
- log, diff, and patch viewers
- confidence & verification visibility
cd samples/infinitysnap-demo
npm test
infinitysnap fix . --command "npm test"http://localhost:4000/api/v1
GET /runsGET /runs/:id/artifactsGET /runs/:id/logs
GET /runs/:id/logs?name=sandbox.stdout
GET /runs/:id/logs?name=sandbox.stderrPOST /runs/:id/fixTriggers the supervised fix β verify pipeline for a failed run.
Possible outcomes:
verifiedrolled_backrefused_low_confidencerefused_not_git
- Snap and Verify are usually fast (command execution time).
- Fix duration depends on model reasoning and repository scope.
- Timeline explicitly shows where time is spent (
fix.cline). - InfinitySnap prioritizes correctness and auditability over raw speed.
InfinitySnap is designed to never hang silently. If a backend fix takes too long, the CLI intentionally falls back to a local, supervised Cline execution.
This section documents how to diagnose timeout issues and how they were fixed.
During early runs, the CLI showed:
- β Calling /runs/:id/fix β¦
- β Backend /runs/:id/fix threw β falling back to local Cline.
Even though the backend fix eventually succeeded when triggered manually.
Run the fix with all FIX-related timeouts disabled:
export INFINITYSNAP_FIX_HTTP_TIMEOUT_MS=0
export INFINITYSNAP_FIX_TIMEOUT_MS=0
infinitysnap fix . --command "npm test"
Built using Cline, OpenAI models (via Cline), and the Node.js / TypeScript ecosystem.






