Skip to main content

continualcode

A coding agent that learns from your corrections in real-time. Built on Tinker.

When you deny a tool call with feedback, the model uses your correction as context to teach itself via on-policy self-distillation, takes a gradient step on LoRA, and retries with updated weights.

You: "fix the test"
Agent: write(test.py, ...)       # overwrites the file
You: n → "use edit_lines; don't overwrite"
  → SDPO update runs immediately
  → agent retries with updated weights
Agent: edit_lines(test.py, 14, 17, ...)
You: y

Install

pip install continualcode
export TINKER_API_KEY=<your-key>
continualcode

How it works

Four feedback types, one training signal. Your correction becomes privileged context for a self-teacher (same model, richer input). Per-token KL between teacher and student = dense training signal — O(N) bits per correction, not O(1). One gradient step on LoRA, retry with updated weights.

Full explanation →

Why not DPO / GRPO / PPO / SFT

DPO needs preference pairs and has no per-token credit. GRPO needs 64 samples per prompt — absurd UX for a CLI. PPO doubles memory with a critic network. SFT on corrections is off-policy and causes catastrophic forgetting. Self-distillation is the unique intersection: dense signal, on-policy, no extra models, mode-seeking stability.

Full reasoning →

Code layout

  • train.py — SDPO core: teacher prompt, logprob scoring, IS update, sampler refresh
  • tui.py — interactive CLI: approve/deny/edit, correction prompt, /metrics
  • tools.py — tool implementations + structured feedback
  • benchmarks/auto_train.py — automated training loop (LCB, multi-rollout GRPO + SDPO)
  • demo/ — deny → train → retry end-to-end

References

  • SDPO — Hübotter et al. 2026
  • SDFT — Shenfeld, Damani, Guestrin 2026
  • GKD — Agarwal et al. 2023
  • Tinker — training API

Metadata

Release files for continualcode 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for continualcode 0.6.0
File Size Uploaded
continualcode-0.6.0.tar.gz 10.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for continualcode 0.6.0
File Interpreter ABI Platform
continualcode-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 MB

Release files / continualcode-0.6.0.tar.gz

Download URL continualcode-0.6.0.tar.gz
Size 10.6 MB
Tags Source
SHA-256 checksum
How to use checksums
f974e4e3a9ee9ee4a05bff4dddbc17ffe6afe2da0bfc765b829532b0e3b3f2e0
BLAKE2b-256 checksum
How to use checksums
d50c6325a31fc1cceba5ac58620edb116a85fca5a006ad7c445525a50dd03002
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release files / continualcode-0.6.0-py3-none-any.whl

Download URL continualcode-0.6.0-py3-none-any.whl
Size 37.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0da9b056f14fc66580522ec31a04dfd25cef89e1541f994009f4ef0e367aa31a
BLAKE2b-256 checksum
How to use checksums
8025c928a83cd9ef54596a74e4f53d07b7913184e660d64ed95afa5f1e410fa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page