Senior Engineer · AI Systems & Backend Platform

Onkesh Bansal

I build the infrastructure that makes coding agents reliable on real codebases. That means memory layers you can audit, review gates the agent cannot skip, and a 70% cut in token cost. Ten years of production backend engineering sits underneath it.

Projects

workPerformance Engineering

Search Campaign Builder: Performance Engineering

A Java and Spring Boot service that handles Google Ads campaign data on a production ad-tech platform. I found and fixed four root causes: missing indexes, N+1 queries, lock contention, and a concurrency bug. The service then absorbed 4× workload growth at flat p99 latency.

workRuby on Rails

Media Activation: Delivery & Changelog

A changelog system I built from scratch for delivery publishing on a production ad-tech platform. It diffs before and after snapshots, calculates changes field by field, and categorizes them on the server. It now records 500 events a day across more than 5 million rows for over 100 internal users.

workAI Systems

Agent Development Harness

A six-phase development pipeline for AI coding agents, with a gate between every phase. Each gate answers a failure that kept recurring in my own PR reviews. It carries a three-tier audited memory layer and a custom Bitbucket MCP server. Search runs on ast-grep and LSP, which cuts tokens by 70%. A reviewer returns its own go or no-go verdict. I use it on my own engineering work.

personalAI Systems

CanvestAI

ETF research for Canadian retail investors, rebuilt as two systems over one SQLite database. A nightly pipeline scores 16 equity sectors through eight weighted lenses, then deliberates over the result. A LangGraph advisor answers questions by fanning out to four discipline agents per turn. Every recommendation is graded again once its horizon elapses, and each lens is graded on its own, so the weights have to earn themselves.

all work →

Writing

all writing →

Open Source

open sourceRust

buffa: charging buffered Any payloads against the memory limit

Merged into buffa, a Rust protobuf implementation with JSON serialization and zero-copy views. Reflective JSON deserialization charged a google.protobuf.Any payload against the element memory limit only at replay, so an arbitrarily large Any could be buffered first and slip past the budget. I added charging variants that meter the budget as the JSON tree is built, so the limit holds while the payload is still buffered. I reported the issue and sent the fix.

open sourceJavaScript

claude-hud: counting unmerged paths in the file stats

Merged into claude-hud, a Claude Code status plugin. The file-change stats counted each path by its git status letters, but the unmerged conflict states were not among the states it classified. UU (both modified) and UA (added by them) were dropped from the count entirely, so a repo mid-merge or mid-rebase reported incomplete numbers. I classified the unmerged entries so every conflicted path is tallied.

open sourceJavaScript

claude-hud: decoding every escape git puts in a quoted path

Merged into claude-hud, a Claude Code status plugin. Git C-escapes a path when it holds unusual characters, but the plugin decoded those paths with JSON.parse, which understands only JSON escapes. Control-character and octal escapes came back garbled, so affected filenames rendered wrong in the HUD. I replaced the JSON parse with a C-style decoder that handles every escape git emits, including multi-byte UTF-8 written as consecutive octal sequences.

open sourcePython

more-itertools: bucket and phantom keys

Merged into more-itertools. Testing a key against a bucket permanently added that key to the ones iteration returns, so a membership test and a list of the keys disagreed for the same object at the same moment. I reported the issue and sent the fix.

open sourcePython

cattrs: naive datetimes on the wire

Merged into cattrs. The msgpack and cbor2 converters unstructured a datetime with datetime.timestamp, which reads a naive value as local time. The number written to the wire then depended on the timezone of the machine doing the unstructuring, so the same datetime round-tripped to a different instant on a different host. I reported the issue and sent the fix.

open sourcePython

more-itertools: value_chain and swallowed errors

Merged into more-itertools. value_chain wrapped a try and except TypeError around a lazy yield from, so the guard stayed active for the whole consumption instead of only classifying the argument. A TypeError raised from inside an argument was swallowed, and a half-consumed object was emitted in its place. I reported the issue and sent the fix.

open sourcePython

more-itertools: numeric_range and float steps

Merged into more-itertools. numeric_range builds each item by multiplying the step, but it derived len(), the in operator, and index() by dividing by the step. With float steps the two methods disagree, so a range reported a length that did not match what it yielded, and it denied membership to its own items. I reported the issue and sent the fix.

open sourcePython

pytest: approx() and nested containers

Merged into pytest. approx() refused to descend into a nested container and said so clearly, but only when that container matched the type of the one holding it. A dict inside a list slipped past and was compared exactly, so the tolerance was ignored without warning. Reported in 2022 and still reproducing on main.

open sourceRuby on Rails

FortyMM: transactional email templates

Merged into FortyMM, an open-source table tennis league platform. I rewrote the Devise mailer templates, adding a plain-text alternative to every HTML mail, email-safe responsive CSS, and wording that sounds like the sport the product is about.

all open source →