Planned, open source, design stage

Cap the spend. Never guess a side effect.

A planned open-source queue for AI jobs, where a retry reuses finished steps and an unknown outcome stays unknown.

ticket report-w42simulated, not real output
summarysaved$0.04
chartparked, job id savedpolls in 2m
publishunknown, checking the wiki page
budget$0.31 of $2.00

02 The problem

A crash costs you twice.

A retry restarts from the top. The paid call and the post both run again.

Illustration with made-up numbers

First run
AI call $0.04 Worker dies during publish
Plain retry
AI call again $0.04 Post published again
With qlane
AI call reused $0.00 Post checked, published once
$0.04spent so far
$0.08and two posts, without
$0.04and one post, with qlane

03 The fix

One workflow. Every feature.

Scroll to see what each part does.

report.weekly.tssketch
// Design sketch: names are proposalsq.workflow("report.weekly", async (ctx, input) => {  const summary = await ctx.step("summary", input, {    maxTokens: 4000,    fallback: [      { provider: "anthropic" },      { provider: "openai" },    ],    expect: (o) => o.sections.length > 0,  }, async (i) => callModel(i));   const chart = await ctx.step.async("chart", { summary }, {    submit: (i) => imageApi.create(i),    poll: (jobId) => imageApi.status(jobId),    download: (jobId, r) => imageApi.fetch(r.url),    maxWait: "30m",  });   const review = await ctx.submit("report.review",    { id: input.id }, { dependency: true });   await ctx.step("publish", { page: input.page }, {    effect: true,    onUnknown: "pause",    probe: (a) => wiki.hasPost(a.page),  }, async (a) => wiki.publish(a.page, review, chart));   return chart;}); await q.submit("report.weekly",  { id: "w42", page: "team-weekly" },  { key: "report-w42", budget: { usd: 2 } });

Design sketch, not working code; names are proposals.

  1. 1

    Name it once. Every ticket of this kind runs this function.

  2. 2

    A retry reuses "summary" and never pays for it again.

  3. 3

    Next provider in order, without using a retry.

  4. 4

    An empty or wrong-shaped result fails the step.

  5. 5

    The job id is saved, so a restart resumes and never resubmits.

  6. 6

    The parent waits for the child and holds no worker.

  7. 7

    A crash mid-publish pauses for a check or a person.

  8. 8

    One key makes a repeat call safe. The cap stops at $2 and keeps finished steps.

Ten more sketches

1Name the workflow

Name it once. Every ticket of this kind runs this function.

q.workflow("report.weekly",
  async (ctx, input) => {
2Named saved steps

A retry reuses "summary" and never pays for it again.

const summary = await ctx.step(
  "summary", input, {
    maxTokens: 4000,
3Provider fallback

Next provider in order, without using a retry.

fallback: [
  { provider: "anthropic" },
  { provider: "openai" },
],
4Expected-output check

An empty or wrong-shaped result fails the step.

expect: (o) =>
  o.sections.length > 0,
5Async provider job

The job id is saved, so a restart resumes and never resubmits.

await ctx.step.async("chart",
  { summary }, {
    submit: (i) => imageApi.create(i),
    maxWait: "30m",
6Child ticket, with dependency

The parent waits for the child and holds no worker.

await ctx.submit("report.review",
  { id: input.id },
  { dependency: true });
7Effect with unknown outcome

A crash mid-publish pauses for a check or a person.

effect: true,
onUnknown: "pause",
probe: (a) => wiki.hasPost(a.page),
8Call it, with a spend cap

One key makes a repeat call safe. The cap stops at $2 and keeps finished steps.

await q.submit("report.weekly",
  { id: "w42", page: "team-weekly" },
  { key: "report-w42",
    budget: { usd: 2 } });

Design sketch, not working code; names are proposals.

Ten more sketches

04 The crash demo

Kill the worker. Nothing repeats.

A simulation on a fake model. No API key, nothing really posted.

Simulation, not real software
qlane demo
$qlane demo
summarypaid $0.04
worker killed (kill -9)
worker restarted
summaryreused, saved $0.04
publishunknown, checking the wiki page
publishconfirmed posted, once
nothing paid twice, published once

05 Honest limits

What it will not do.

No exactly-once magic.A step in flight when a worker dies runs again.
Caps are a bound, not a wall.Calls made outside qlane can still overspend.
Not a guardrail or a gateway.No prompt filtering, retrieval, evals or proxying.
No speed pitch.The goal is reliability and cost safety.

Where it stands: design only. No code, no alpha. Read every limit

06 Your turn

Is this your problem?

Tell me what breaks today. I am not selling anything.