All work

Calx

Development paused

Make agent corrections persist across sessions.

I built Calx to turn recurring agent corrections into rules enforced across sessions. I designed the correction lifecycle, built the Bench desktop workspace and Tether runtime, and connected them to services for rule validation and signed distribution.

My role

Founder · End-to-end product and engineering

Current state

Independent project · development paused.

Text version
Capture a correction, find related mistakes, choose whether to promote it, then validate and distribute a signed rule for the runtime to enforce.
  1. Capture

    Record the correction and the context behind it.

  2. Recognize recurrence

    Use related corrections as evidence for a possible rule.

  3. Human promotion

    A person decides whether the correction should become a constraint.

  4. Validate

    Generate and validate a candidate, with review where needed.

  5. Runtime control

    Verify signed rule material locally and bind applicable controls.

In this case study

Corrections that survive the next session

I kept seeing the same problem while building with agents: a correction made sense in one conversation, then needed explaining again in the next. Calx became a way to capture those corrections, recognize recurring mistakes, and turn selected corrections into rules the runtime could enforce.

I owned research, product direction, design, architecture, implementation, and evaluation, using coding agents throughout. I signed design partners to validate the capture, promotion, and enforcement loop against a live production agent.

From a developer tool to an owned runtime

I shipped a CLI SDK, a Claude Code integration, and developer documentation. That work established the correction workflow, but I wanted control over whether an agent could take an action. Files and external hooks left that control dependent on another runtime.

I built Tether, a Python runtime using LangChain and LangGraph middleware, to own sessions, tool availability, action checks, and model routing. Bench, a Svelte and TypeScript desktop workspace inside Tauri, put correction capture and promotion decisions beside the work. A local WebSocket connected the two.

From a repeated mistake to an enforced rule

The operator records what happened, what should have happened, and the context. Related corrections create a reason to review the issue. The operator then decides whether to promote it into a rule and what that rule should cover.

The illustrative walkthrough below uses a project briefing: the agent should read it before changing files. A promoted prerequisite can withhold mutation tools until orientation is complete. That puts the restriction where the agent selects and uses tools.

I kept promotion deliberate because similar mistakes can need different responses. Repetition alone should not authorize a new restriction.

Distributing rules without moving execution

Cloud services handle rule compilation, validation, signing, and distribution. Tether verifies signed updates, caches rules locally, and binds the applicable controls to sessions. Signing establishes artifact integrity; separate validation tests the rule’s behavior against the runtime and tool catalog.

I supported direct model calls with the user’s own key alongside a managed route through the cloud. The runtime also carries a structured handoff between sessions so work can continue with relevant context.

I published three technical preprints alongside the developer work. Development is paused; the case below shows the system architecture and a clearly labeled design prototype of the Bench correction workflow.

Design prototype · illustrative workflow

Inside Bench

One illustrative correction follows the same path through capture, promotion, and intended subsequent behavior: read the project briefing before making changes.

Calx BenchIllustrative workstream

Keep the correction beside the work

The operator records that the agent attempted a change before reading the briefing. The correction retains its context in the workspace.

Workstream / Engineering

Agent

Agent attempts a file change before orientation.

Correction attached to this response

Decide what should become a rule

Related corrections make the issue worth reviewing. The operator deliberately promotes an orientation prerequisite for tools that change state.

Correction ledger

Related context

Related corrections suggest a recurring orientation issue.

Rule candidate

Prerequisite
Read project briefing
Applies to
Tools that change state
Promotion
Operator decision

Make the prerequisite part of execution

The intended interaction gives the agent a clear path: read the briefing, satisfy the orientation gate, then proceed with changes.

Workstream / Engineering

Tool availability

Mutation tools are withheld while orientation is incomplete.

Read briefingOrientation satisfiedChanges available

System architecture

Bench captures corrections beside the work. Tether runs the agent and enforces rules. Cloud services compile, validate, sign, and distribute those rules.

Working surface

Local execution

Services and inference

Component responsibilities

Bench

The Svelte and TypeScript workspace runs inside Tauri. It keeps sessions, corrections, and rule-promotion decisions in one interface.

Svelte / TypeScript

Tauri shell

The Rust shell connects Bench to the local Python runtime and delivers runtime events to the interface.

Tauri / Rust

Tether

The Python runtime manages sessions, middleware, tool availability, model routing, and a local rule cache. Owning execution lets Calx withhold tools or check prerequisites when the agent acts.

Python / LangChain / LangGraph

Cloud services

Python REST services manage the correction lifecycle, rule compilation, validation, signing, and distribution. Compilation runs outside the desktop bundle.

Python

PostgreSQL

PostgreSQL stores correction and rule lifecycle records. Tether caches the rule material used during local execution.

PostgreSQL

Direct inference

With bring-your-own-key routing, Tether sends inference requests directly to the selected model provider.

Managed inference

Managed inference passes through the cloud service, making that service part of the inference data path.

Connections and protocols

  • Bench → Tauri shellNative bridge

    The interface invokes the Tauri shell and receives runtime events through its native bridge.

  • Tauri shell → TetherLocal WebSocket

    A local WebSocket carries commands and events between the Rust shell and Python runtime.

  • Tether → Cloud servicesREST + update stream

    REST supports lifecycle operations and artifact retrieval; an update stream announces rule changes.

  • Cloud services → PostgreSQLPersistent records

    The service stores lifecycle records in PostgreSQL.

  • Tether → Direct inferenceProvider API

    BYOK inference routes directly to the model provider.

  • Tether → Managed inferenceManaged request

    Managed inference routes through the cloud proxy.

Connections and protocols
  • Bench Tauri shellNative bridge

    The interface invokes the Tauri shell and receives runtime events through its native bridge.

  • Tauri shell TetherLocal WebSocket

    A local WebSocket carries commands and events between the Rust shell and Python runtime.

  • Tether Cloud servicesREST + update stream

    REST supports lifecycle operations and artifact retrieval; an update stream announces rule changes.

  • Cloud services PostgreSQLPersistent records

    The service stores lifecycle records in PostgreSQL.

  • Tether Direct inferenceProvider API

    BYOK inference routes directly to the model provider.

  • Tether Managed inferenceManaged request

    Managed inference routes through the cloud proxy.

Own the execution boundary

I needed control over the tools an agent could use and the prerequisites for using them. Building the runtime put those checks inside execution instead of depending on reminders or external hooks.

Separate local execution from compilation

I kept agent execution and cached rules local while services handled compilation and signing. Rule generation could change without moving execution into the cloud.

Make the workspace part of the product

I put correction capture beside sessions in Bench so the operator could retain the original context and review a proposed rule without switching to a separate CLI workflow.

Correction lifecycle

Corrections retain what happened and what should have happened. Related corrections prompt a review; the operator decides whether to create a rule.

Observe

Decide

Apply

Component responsibilities

Capture

Record the attempted behavior, the correction, and enough context to interpret it later.

Recurrence evidence

Find related corrections that suggest a recurring problem. A pattern prompts a suggestion; it does not authorize rule compilation.

Human promotion

The operator decides whether to promote a correction and what the proposed rule should cover.

Generate and validate

Generate and evaluate a candidate enforcement artifact. Route it for review when validation or ambiguity requires a decision.

Sign and distribute

Sign approved rule artifacts and make them available to runtimes. Signing protects artifact integrity; validation tests behavior.

Verify and bind

Fetch updated rules, verify their signatures, refresh the local cache, and bind applicable controls to active sessions.

Connections and protocols

  • Capture → Recurrence evidenceRelated evidence

    Recorded corrections supply the context used to identify recurrence.

  • Recurrence evidence → Human promotionSuggestion

    A repeated pattern creates a promotion opportunity for the user.

  • Human promotion → Generate and validateExplicit request

    Only deliberate promotion starts the candidate-generation path.

  • Generate and validate → Sign and distributeValidated artifact

    Validation informs whether an artifact proceeds or needs review.

  • Sign and distribute → Verify and bindUpdate → fetch → verify

    An update event triggers artifact retrieval and local verification before binding.

Connections and protocols
  • Capture Recurrence evidenceRelated evidence

    Recorded corrections supply the context used to identify recurrence.

  • Recurrence evidence Human promotionSuggestion

    A repeated pattern creates a promotion opportunity for the user.

  • Human promotion Generate and validateExplicit request

    Only deliberate promotion starts the candidate-generation path.

  • Generate and validate Sign and distributeValidated artifact

    Validation informs whether an artifact proceeds or needs review.

  • Sign and distribute Verify and bindUpdate → fetch → verify

    An update event triggers artifact retrieval and local verification before binding.

Keep promotion explicit

Similar mistakes may have different causes. I kept promotion manual so recurrence could prompt a decision without automatically restricting future work.

Test behavior as well as integrity

A valid signature establishes the artifact’s integrity. I kept behavioral validation separate to check what the rule would do when applied.

Runtime controls

Tether checks prerequisites before exposing tools, checks attempted actions, reviews responses, and carries working context into the next session.

Before action

At execution

After action

Component responsibilities

Orientation

Check prerequisites, such as reading a project briefing, before exposing tools that can change state.

Tool availability

Middleware uses the runtime tool catalog to control which tools the agent can select.

Action checks

Check applicable conditions when the agent attempts an action, at the point where the runtime can enforce them.

Response review

Evaluate the agent’s response against applicable constraints after execution.

Structured handoff

Carry relevant working context into the next session through a structured handoff managed by the runtime.

Connections and protocols

  • Orientation → Tool availabilityPrerequisites satisfied

    Orientation status informs tool availability.

  • Tool availability → Action checksSelected tool call

    An available tool can be selected, then checked at the execution boundary.

  • Action checks → Response reviewExecution result

    Results return to the agent and pass through the response boundary.

  • Response review → Structured handoffCarry context forward

    The session can preserve a structured account of the work for continuity.

Connections and protocols
  • Orientation Tool availabilityPrerequisites satisfied

    Orientation status informs tool availability.

  • Tool availability Action checksSelected tool call

    An available tool can be selected, then checked at the execution boundary.

  • Action checks Response reviewExecution result

    Results return to the agent and pass through the response boundary.

  • Response review Structured handoffCarry context forward

    The session can preserve a structured account of the work for continuity.

Match the test to the runtime

I tested controls against the real tool catalog and runtime objects. A check that passes in isolation still needs to govern the action in the running agent.

Treat continuity as a system responsibility

I made session rollover an explicit runtime operation so the next session could receive a structured account of the work.