Thomas LJ (@thmslj) header
Thomas LJ (@thmslj) profile picture

Head of Engineering @varickagents, building Agents enterprises can trust with real work • Prev: eng leadership @Dropbox • 🇫🇷 in the Bay

Joined August 2026
Prompt of the day: target the *unmodified* code most likely to break after your agent built the happy path: Given this git diff and the surrounding call graph, ignore unit tests for the new lines. Instead, write 3 integration test cases targeting existing callers that rely on implicit assumptions (ordering, nullability, latency, or side effects) that this diff subtly changes.
3
14
785
Thomas LJ retweeted
There is way too much noise in AI right now. Every day there's a new technological advancement. - Should you switch from Claude Fable 5.2 to Gemini Neon? - Should you build a company brain or a company 2nd brain? - Should you build a software factory or an agent factory? Varick helps you cut through the noise. The team is hosting its first ever AI Transformation Office Hours, a series meant for enterprise executives to better understand how AI should be used in their departments. This first session is all about AI in the Office of the CFO. If you're an enterprise CFO, CAO, VP of Accounting or related finance operation, this session is meant for you. Here, we'll answer questions like: - Which parts of the close can agents run today, and which parts still need a person to sign off? - Where do you start with finance agents: AP, AR, reconciliations, or FP&A? - How do you get from a 20-day close to a 5-day close without adding headcount? - How do you keep your auditors comfortable when an agent prepares the work-papers? - How do I earn the buy-in of finance operators when building agents to handle manual work? Every attendee leaves with their team's Finance AI Maturity Score (AIMS). Thursday, December 10, 2026, at 2pm ET / 11am PT. Register in the link below; seats are limited to ensure high quality.
20
6
1
82
10,089
Love this [deep and complex] → [here's a tactical doc you can act on right now]. Bravo
80-90% of major "AI incidents" that cause real harm have no attacker, just an agent tripping up on a poor codebase. i turned the latest research into into a prompt that checks your setup for the most common causes. Hand it to your agent -> github.com/jdpru/cover-your-…
1
6
1,256
Two copies of the same supplier invoice come in 40 seconds apart (e.g. one by email, one via portal) → they get processed by two workers of the AP agent → both check if they already paid → the answer for both is "no" → we paid the supplier twice, now we have to chase the supplier for a refund With recently released PG19 you can do: INSERT INTO invoices (...) VALUES (...) ON CONFLICT (supplier_id, invoice_no) DO SELECT RETURNING worker_id = $ME AS first, amount = $amount AS same_amount → the second worker gets the first one's row back → compare the amount with RETURNING → if it's the same, do nothing → if it's different, send it to a human, since someone changed the invoice in the meantime Shoutout to Max Demoulin of the @DBOS_Inc team, who often sprinkles my LinkedIn feed with really cool pieces on PG (and DBs in general). Inspiratiob today: "Two requests arrive with the same idempotency key. The first inserts the order. What does the second one get back? Until Postgres 19, released today: nothing." I've been thinking of more use cases like this and will add them in the comments below. Please share yours! Original post: linkedin.com/feed/update/urn…
16
7
1
46
16,076
[9] Note that if someone is inserting the conflicting key in a transaction that hasn't committed yet, this will wait for them to finish. So if your transactions in the idempotent API example are long, duplicate requests will be serialized. Keep them short
87
[8] A "get or create" combined with a mutation. Because DO SELECT FOR UPDATE returns the row, you get the benefit of it being already locked. Some examples might be lazy rate limiting (create the bucket as needed), creating wallets/counters on first use then incrementing them in the same transaction.
55
[7] Useful for deduplicating content addressed data, e.g. blobs, document chunks, embeddings, etc. You hash some data, insert it, and then only do the work (embeddings, upload to S3, etc) if created is true
67
[6] Batch surrogate key lookups, if you're building dim tables for an ETL pipeline. INSERT INTO dim_url (url) SELECT DISTINCT u FROM unnest($1::text[]) AS x(u) ON CONFLICT (url) DO SELECT RETURNING id, url; You used to need a really tricky CTE + UNION to do this in one statement, and even then it could miss rows under concurrent inserts. The DISTINCT is important to avoid bad behavior in the edge case that a single statement has dupes.
75
[5] The "inbox pattern", for at-least-once queues (Kafka, SQS, Stripe webhooks, GitHub webhooks, etc). INSERT INTO inbox (msg_id) VALUES ($msg_id) ON CONFLICT (msg_id) DO SELECT RETURNING processed_at; If processed_at is set, skip it. If you want it to be effectively-once, you can run the handler inside the same transaction.
101
[4] To only do a computation once across all pods (a.k.a. singleflight in Go, to avoid cache stampedes etc.): INSERT INTO computations (key, owner) VALUES ($KEY, $ME) ON CONFLICT (key) DO SELECT RETURNING owner=$me AS i_compute, result
1
132
[3] For making idempotent APIs (like Stripe), and making sure people don't misuse keys: INSERT INTO idempotency_keys (key, request_hash, status, response) VALUES ($KEY, $hash, 'pending', null) ON CONFLICT (key) DO SELECT RETURNING status, response, request_hash=$hash AS same_body If not same_body, return 422. If status=done, return response. Otherwise (the original request is still in-flight) return 409, without any race and in a single roundtrip.
1
120
[2] Most of these you can solve by returning a self-generated value to see if you created the row, e.g. INSERT INTO t (id, key, ...) VALUES ($my_uuid, $KEY, ...) ON CONFLICT (key) DO SELECT RETURNING id, id=$my_uuid AS created
187
[1] Postgres 19 ships ON CONFLICT ... DO SELECT (FOR UPDATE/SHARE) [WHERE whatever] RETURNING whatever, which returns the pre-existing row(s) which caused the conflict. WHERE is optional, RETURNING is required. This is better than the current "DO UPDATE SET x=x" hack because it doesn't create dead tuples, and it's better because you don't need any CTE hackarounds.
2
317
Hopefully this will resonate with both sides of the negotiation table. When a vendor pitches you an AI solution, it usually feels simple. That's basically the job, and I'm assuming you already picked a vendor above average. If they made it to the room, they're doing something right. What to look for is whether they pitch the solution or the delivery. They can paint a grand vision, but can they tell you where they'd start? What's the smallest next step we can take together, who does it, how do we know it worked. This removes so much of the overwhelm that comes with large projects, especially AI or agentic transformations that all look the same nowadays. It's hard to master this live, especially when being grilled by the customer. I've seen painting pictures fall flat because there's no connection between the vision and the next step, between the ideal state and the daily grind. Good leaders bridge that gap, and can do it on the fly. Can a good salesman do it? Maybe. But it takes a team to gather enough data to build the vision before it gets pitched. Head of eng makes sure it can be done, tells where to start and how we measure success. FDS truly understand the processes and can speak almost as a member of your team. FDE can tell what they would do if they started tomorrow. Don't settle for grandiose if you have no idea how it can materialize tomorrow.
4
17
891
100%. Not sure if spicy or sadly realistic, but I genuinely believe in large companies, exceptions are the norm, not the reverse.
We've had hundreds of calls with execs (F500s, T20 PE Firms, etc), and I fed notes from the last 25 into Claude to answer the question: "What are companies struggling with, when it comes to AI Transformation?" It gave a really good response: [We fix all 10 of these at Varick. Work with us below.] 1. They're improving one step but not seeing end-to-end impact. The amount of hands-on cycle time in most processes is 1-5%, and that's the part that gets faster while people outside the process wait. The engineering org that writes twice as much code but isn't shipping faster. The equipment dealer that's had a vendor come in and work for months to automate one step of an 8 step order processing process. Most point solutions are 1/20th of the value people think they are. 2. They're treating workflows as if they're exceptions. >25% of invoices come in without a PO for this finance team, and as the head of the process said, "statistically they won't be exceptions. They will be the norm." Which is why anyone who's seen a process end-to-end immediately discounts demos people bring in, which are almost always the happy path only. 3. They're catching errors based on size, not based on good controls. I spoke with an Accounts Receivable team that bills a partner based on tickets with free text fields that, to put it politely, have been incorrect or required rework in 5 of the last 8 quarters. Why didn't they catch it? Well if the team credits the partner for $3M they'll catch it at close, but if they credit the partner for $20k they won't. As one person on the team said, "Humans. Humans catch it." 4. IT owns AI and part of their job is to say no. Spoke with a bank, a software company, and an insurance company in one day who said they've been blocked on everything by IT. One engineer told me he spent a month and $600 of his own money building a multi-agent system in Claude to help with a design process. And while he can spend $600 personally, he's only allowed to spend $150/mo on AI at work, and the company won't even let him buy a subscription. 5. They don't have accessible data. Sales can't connect to Salesforce until they "clean up the data." Their ERP doesn't have OAuth so they can only log in with a username and password. One engineering team's design data is a 648GB zip file that drops every 5-10 hours. Most prototypes get to demos because they're built on static data, and then can't move to production because real processes need real-time data. 6. They don't have good process docs, and even if they did they wouldn't be accurate. As one person told me, the SOPs for their processes are "on random SharePoints everywhere. A treasure hunt." Plus, when we mine the systems of record our process maps generally have ~20% more steps than what companies think is in the process. 7. Legal needs tracking, not contract drafting. I spoke with a legal team that had ~8,000 tickets last year, the vast majority administrative. Another legal team said they generally track contracts until the first draft is complete, and then the system no longer tracks them. As they told me, "the default is, it's legal. It's always our fault." And none of these teams can track how long things take, which is a problem when they need to ask for more headcount and the answer they get is, "okay prove it." 8. The last consulting engagement they had only provided numbers, not a path forward. In the words of one person I spoke with: "they gave us a lot of numbers. But the how is really the most complex thing." Even engineering teams are being asked by boards what they're measuring, and most can only provide metrics around merge requests. 9. Most companies don't have agent sprawl but they do have agent nothing. People are building agents for themselves but they're the spreadsheets of 2026: only the people that built them know how they work, and they'll keep running after those people move on. Meanwhile the companies that we're talking to that are backed by PEs and have real moats in their businesses told us that agent sprawl "would be a good problem if we had it." 10. They're betting on the team, not on the method. In the words of one person I spoke with, "everybody has a story. Pitch went great and then project went terrible. And the difference is the person that walked in the door." If you want these problems solved for you and more, check us out below:
1
10
3,446
Playground, prison, or sandbox? Agents don't know nor need to know the difference. Design as if it's been hacked already anyways. Anticipating agent risks by their "obedience" to prompts seems off to me. We've seen agents refused a direct malicious command, but when part of a routine package install, got the greenlight. When doing design review, I always assume that the agent has been compromised and list what it can still do. Then remove one leg of Simon Willison's lethal trifecta (private data, untrusted content, an outbound channel) using tool scopes, egress allowlists, and yes, a sandbox/prison. An agent that drafts customer summaries from inbound email gets `read` access but no `send` tool. A human sends. One with messaging tools gets no warehouse access. Only allowed egress? Egress gateway and telemetry. If you can't name the removed leg, I think it's still exposed.
3
16
872
Forward-deployed engineering is a good discovery tool in enterprise AI, but if the customer only gets value while your engineer is embedded, you have people-market fit and a hiring-velocity ceiling. Old-school discipline works: give each engagement a stated hypothesis, build it on the core platform primitives rather than a fork, and end with a decision to keep it as a priced service, fold it into the roadmap, or kill it. Simple test: pull the FDE tomorrow, does the customer still get what they paid for? A one-off connector should become a generic connector, a priced services line, or get deprecated, never an unowned fork. I read that Madrona found 77% of enterprises re-evaluate AI vendors every six months or less, so I think services sold as software can unwind in one renewal.
11
2
1
59
4,562
I don't think prompt-injection filtering can be a security boundary for agents on its own. OWASP maps nine dimensions of prompt injection, and a filter tuned for one misses the others, so enforcement has to sit at the action layer. For each agent-to-tool integration, decide which layers you rely on: input filtering, a logged runtime check per action (allow, ask or block against a declared policy), and a sandbox that limits the damage if the model gets it wrong. For an agent with database access, reads are allowed, writes need human approval, schema changes and exports are blocked, and everything runs in an isolated sandbox with scoped credentials. If you can only name the first layer, I think that is your real answer.
61
48
12
1,180
165,992
Thomas LJ retweeted
Every CIO in the country has been tasked with AI governance, a buzzword that deserves a proper explanation. The below article is a must read. Simply put, if you want to build agents that move the needle for large companies, you have to handle concerns around governance, auditability, and evals, you will fail. There will be 1000x more agents deployed as time goes on, meaning this issue compounds if not handled correctly now. Thomas was an early Dropbox engineer, is top 0.01% in terms of AI understanding and ability, and is now Head of Engineering at Varick. There is no one more qualified to speak on the topic than him!
The last 20% break when the first 80% don't have the right foundations. Fun exploration on enterprise governance:
23
27
3
333
39,570