23 Nov 2026

feedDjango community aggregator: Community blog posts

My Django on the Med 2026 🏖️

From 23 to 25 September 2026, I hosted the second edition of Django on the Med in Pescara. This is what it meant to welcome the Django community to my hometown and find time to take part in the sprints myself.

23 Nov 2026 9:57pm GMT

feedPlanet Python

Paolo Melchiorre: My Django on the Med 2026 🏖️

From 23 to 25 September 2026, I hosted the second edition of Django on the Med in Pescara. This is what it meant to welcome the Django community to my hometown and find time to take part in the sprints myself.

23 Nov 2026 3:57pm GMT

PyCharm: Creating Polars Expression Plugins in PyCharm: A Step-by-Step Guide for Rust Beginners

Polars is a favorite among data scientists. It's a high-performance, columnar DataFrame library written in Rust and powered by Apache Arrow.

Unlike traditional single-threaded tools, Polars uses full multicore CPU parallelism, efficient memory allocation, and lazy execution with query optimization. These features let data professionals execute complex joins, filters, and aggregations on large datasets significantly faster while saving RAM.

However, real-world data processing often requires specialized processes to prepare raw data for operational or analytical use cases.

Built-in Polars expressions may not cover highly specialized algorithms or proprietary business logic out of the box. Without custom expression plugins, data engineers and scientists often resort to standard user-defined Python functions or iterative processing. This potentially introduces performance bottlenecks and sacrifices some of Polars' native speed and memory efficiency. To overcome these bottlenecks, you may want to consider creating Polars expression plugins.

Polars expression plugins

Polars expression plugins allow you to create custom functions and register them as expressions in the Polars library. The Polars engine dynamically links these functions to the runtime, and their performance will be close to that of native expressions.

Expression plugins offer three key benefits:

But there's a catch: These functions must be implemented in Rust (because of the native functionalities mentioned above). To write Rust code in PyCharm, you will need to install the Rust plugin and configure the Rust toolchain.

The Expression Plugins chapter of the Polars user guide gives you a quick overview of the core concepts. This blog post digs a little deeper and is geared toward PyCharm users who are new to Rust.

Create a Polars plugin project using a template

The Rust plugin in PyCharm uses cargo-generate under the hood, allowing developers to quickly scaffold new Rust projects directly from templates.

To create a Rust project, start by installing the Rust plugin and toolchain, following the instructions in this documentation. Then, while you have the New Project window open, click on the + icon at the bottom.

In this example, we'll create our Polars plugin from a template I made earlier. Simply paste the URL for this template into the Template URL field and click Add.

Now the template will be available as an option, and we'll select it for our current project. Don't forget to use the Location field to establish a location and name for your project. In this example, ours will be called "polars-plugin-demo".

When we click Create, a project is created with the necessary .toml files and file structure. Then we can just dive straight into it.

Before we start developing, we'll have to add a Python environment and interpreter, as you can see <No interpreters> in the bottom right of the screenshot above. Let's set one up now by clicking on <No interpreters> and selecting Add New Interpreter, then Add Local Interpreter. For this example, we'll use uv (which I've already installed). We should also make sure to select the latest Python version, which is Python 3.14 at the time of writing.

With everything set up, we can start creating our custom Polars plugin.

What's in a Polars plugin project

Let's start by looking at what's inside a new project by default

First, we have two .toml files for the project settings. Cargo.toml is for Rust, and pyproject.toml is for Python. Since our project uses both languages, we'll need both files:

Now we'll follow the steps laid out in the Writing the expression section of the Polars user guide. The source code for Rust will be in the src/ folder. This is the same as using maturin init or cargo init to start a Rust project:

Then we'll have a directory with the same name as our project. This is where all the Python-specific files are located:

As we go along, I'll explain the contents of each file and how they all work together.

If you're using PyCharm, you might also notice the target/ folder in your project files. Although we have not built the project yet, once we've configured a local virtual environment (.venv) as its Python interpreter, PyCharm regularly scans and indexes the environment. When PyCharm runs background tasks, it can inadvertently trigger PEP 517 build hooks using information in pyproject.toml. However, this build (the target/ folder) is mainly used to service PyCharm's checking and indexing functionality. We will ignore it for now.

Writing a Polars plugin

Working out the expression logic

As explained above, we will mainly be working in src/expressions.rs, which is currently empty. In our example project, we'll start by adding this code to the file:

use polars::prelude::*;

use pyo3_polars::derive::polars_expr;

use std::fmt::Write;

fn capitalize_str(value: &str, output: &mut String) {

    if let Some(mut first_char) = value.chars().next() {

        first_char.make_ascii_uppercase();

        write!(output, "{first_char}{}", &value[1..]).unwrap();

    }

}

#[polars_expr(output_type=String)]

fn capitalize(inputs: &[Series]) -> PolarsResult<Series> {

    let ca = inputs[0].str()?;

    let out: StringChunked = ca.apply_into_string_amortized(capitalize_str);

    Ok(out.into_series())

}

Let's look at this code line by line to understand what it does. First we have the imports:

The logic of our expression is implemented in the capitalize_str function. Instead of returning a String, the function takes the input value and a mutable output buffer. This is necessary because it's the format demanded by apply_into_string_amortized, which we will call later, so that it can promise one allocation for a whole column instead of one per row.

In this case, the caller in Polars owns the buffer and hands the same one back on every row. Our function can't own that buffer, because otherwise it only lives for one call. The only way to reuse it is for the caller to hold it and lend it out as a &mut String.

Inside the function:

Note that, in this example, we assume that each character is stored in a single byte only. If the first character is multibyte, byte 1 lands mid-character, the slice panics, and the program will stop working.

After the logic is set, the capitalize function with the #[polars_expr] attribute is responsible for exporting the expression.

Note that Polars looks up symbols by name at runtime, which means there's no need to register our expressions to the module in lib.rs by hand. Instead, we'll register them on the Python side later.

Putting it together as a module

Now that we've created the expression logic and registered it as a symbol, we can look at the rest of the project and see how the pieces fit together. Let's look at src/lib.rs, which is the crate root for a Polars expression plugin:

mod expressions;

use pyo3_polars::PolarsAllocator;

/// Polars plugin expressions implemented in Rust.

#[pyo3::pymodule]

mod _internal {

   use pyo3::prelude::*;

   #[pymodule_init]

   fn init(m: &Bound<'_, PyModule>) -> PyResult<()> {

       m.add("__version__", env!("CARGO_PKG_VERSION"))

   }

}

#[global_allocator]

static ALLOC: PolarsAllocator = PolarsAllocator::new();

This code is pure scaffolding, with no expression logic of its own. However, it's still essential that we understand what it does:

mod _internal {...} declares the Python extension module using PyO3's declarative module syntax. The name _internal has to match module-name in pyproject.toml, which is what maturin uses to decide where to drop the compiled _internal.abi3.so inside the Python package.

The module body is nearly empty. But this is intentional, as Polars plugin functions aren't exposed as Python functions. The only thing #[pymodule_init] does is set __version__ on the module from CARGO_PKG_VERSION, resolved at compile time by env!. The module still matters even though it's empty because importing it is what loads the .so file into the process, which is what makes the exported #[polars_expr] symbols available for Polars to resolve.

static ALLOC: PolarsAllocator = PolarsAllocator::new(); installs Polars' allocator as the Rust-side global allocator. This is the recommended setup for pyo3-polars plugins: It ensures the plugin shares the same allocator as the Polars build it's loaded next to, keeping memory management compatible when data passes between Polars and the plugin, and it lets Polars' memory accounting see the plugin's allocations.

The Python-side setup

Now let's look at the Python side. There are three files inside the polars_plugin_demo/ folder. These files are all scaffolding for a Polars expression plugin and are essential when adding our custom expressions to Polars.

After reading through these files, uncomment the example in __init__.py:

def capitalize(expr: IntoExpr) -> pl.Expr:

    """Capitalize String."""

    return register_plugin_function(

        plugin_path=PLUGIN_PATH,

        function_name="capitalize",

        args=expr,

        is_elementwise=True,

    )

We are now ready to build our custom Polars expression.

Building and testing our plugin

Although we can build the plugin manually with maturin develop, PyCharm can handle this step for you. It invokes maturin develop to compile your Rust modules into a native shared library (an .so file in this case) and drops it into the designated directory.

Since we've configured

[tool.maturin]
module-name = "polars_plugin_demo._internal"

in the pyproject.toml file, our .so file is placed in the polars_plugin_demo/ folder. We also need to make sure the name of the PyO3 module in src/lib.rs matches the last part of module-name (_internal in this case).

To trigger a build, simply run or debut a Python script that uses the plugin. In a real project, you'd typically have a set of Python tests sitting in a tests/ folder or something similar. However, since this is only a demo, let's keep things simple and use the following script:

import polars as pl

from polars_plugin_demo import capitalize

df = pl.DataFrame(

   {

       "attendees": ["john", "mary", "connor", "sally"],

   }

)

out = df.with_columns(names=capitalize("attendees"))

print(out)

Now that our customized plugin capitalize has been built and included in the polars_plugin_demo module, we can import it and use it like other Polars expressions.

Run the script just like you'd normally do in PyCharm - for example, by clicking the Run button in the top-right corner:

You'll see the loading bar at the bottom:

This indicates that maturin develop is running in the background. The result is cached, so the next time you run the script (assuming you haven't made changes to the module), it will execute much faster.

Want a challenge? Try writing some unit tests and running them with pytest to see if everything works as expected.

What's next?

If you'd like to learn more about how to create Polars plugins, check out my workshop on GitHub. You might also enjoy this tutorial by Marco Gorelli or the Expression Plugins section of the Polars user guide.

Explore more of what the Rust plugin in PyCharm offers to streamline your project with Rust and Python. The plugin enhances cross-language development with intelligent code completion, seamless navigation between Rust and Python modules, and automated refactoring across your codebase. Furthermore, its integrated debugging support lets you step through both Python scripts and compiled Rust code effortlessly, ensuring a smooth and unified workflow.

23 Nov 2026 12:42pm GMT

Graham Dumpleton: Muru: working with coding agents

When I wrote about twenty years of mod_wsgi and why I had started on Muru, part of the answer was AI coding tools. They are what made it practical for me to build something this size. The flip side is that coding agents are now often the ones running a web application while it is being worked on. They start it, poke at it, read what went wrong and change the code, and they do all of that through whatever the server gives them.

With gunicorn or uvicorn, what the server gives them is not much. An agent starts the server in the background, sends it some requests with curl, and reads whatever the server happened to print. If a request hangs, the agent sees a timeout and nothing else, so it goes back to reading the code and guessing. Seeing what a stuck thread is doing means reaching for something like py-spy, which may need privileges the agent doesn't have. And when it wants to try a change, it restarts the server and the old version is gone.

The earlier posts in this series covered what the Muru daemon knows while an application runs: releases, events, logs and tracebacks per release, what every worker thread is doing, and rollback as a routing change. This post is about handing all of that to a coding agent.

The MCP server

muructl mcp serve speaks the Model Context Protocol on its standard input and output, and talks to the daemon over its admin socket the same way the other muructl commands do. For Claude Code, it goes in .mcp.json at the top of the project:

{
  "mcpServers": {
    "muru": { "command": "muructl", "args": ["mcp", "serve", "--up"] }
  }
}

The --up option starts the user's daemon if none is answering, so the first tool call works on a fresh checkout.

The server offers a few dozen tools. Each one runs the muructl command of the same name with --json and returns what it prints, and each is marked for the client as either only reading or changing something. Deploying, rolling back, draining and running canary rollouts are there. Stopping or upgrading the daemon, running arbitrary code in a worker and one-off commands with muructl exec deliberately aren't, and run_command only runs the commands an application declares in its [tool.muru] settings.

What an agent may do can be cut down further. With --read-only the server lists only the tools which read, so an agent can watch and diagnose but not change anything. With --allow rollback,drain it adds just those two. A tool left out isn't hidden by convention, it doesn't exist as far as the client is concerned. Calling deploy against a server started with --read-only:

{"jsonrpc": "2.0", "id": 3, "error": {"code": -32602, "message": "no tool named deploy"}}

The skill

Tools let an agent operate Muru, but don't tell it what a release is, what each operation does to traffic, or what to check afterwards. That is what the skill is for. It is embedded in muructl, so it always matches the version being used, and is written into the project so it travels with the code:

muructl mcp skill install
muru: wrote the skill for muructl 1.0.0 to .claude/skills/muru/SKILL.md

The skill describes applications, releases, traffic and overlays, has a table of each operation and what it does to traffic, and lays out a development loop: check the status, deploy the working tree, run the tests against the daemon's listener, and when something fails, find out why from events, logs, the requests in flight and worker stacks before changing any code. It works through the MCP tools when the agent has them, and through muructl --json when it doesn't.

muructl mcp skill status says whether the project's copy is current, and exits with a non-zero status when it isn't, so a CI job can check it after muructl is upgraded. The MCP server checks as well. In a project without the skill, the instructions it gives the agent at the start of a session end with:

The Muru skill: the project carries no skill at .claude/skills/muru/SKILL.md; `muructl mcp skill install` writes it.

An agent and a broken change

To see how this works in practice, I set up a small WSGI shop application in a git repository, with a few JSON pages over a dictionary of orders, guarded by a lock, and a tests.py which runs against the daemon's listener. That version was deployed as shop@r1 and passed its tests.

For the scenario, I then pulled down a change which a colleague had committed to the repository before rushing out in a hurry, leaving it for me to test. It added an /orders/summary page and a test for it, and along the way changed get_order() to index the dictionary rather than call .get(). The new summary() function took the lock and then called all_orders(), which takes the same lock. A plain threading.Lock isn't reentrant, so that is a deadlock.

I then ran Claude Code headless in the project, with the MCP server above, the skill installed, and permission to use only the Muru tools, python3 tests.py, and tools for reading files. The prompt was:

A colleague committed a quick change to our repo that adds an order summary page, and left it for me to test. I've pulled it into this checkout. Deploy the working tree as a new release of the shop application using the muru tools, then run python3 tests.py against it. If tests fail, use the muru tools to find out why rather than guessing from the code alone, roll the application back to the previous release so the shop keeps working, and report what you found. Don't change any code yet.

Everything that follows comes from the session's record of tool calls and their results.

The agent loaded the muru skill, looked at what the commit changed, then called status and list to see which release was serving. It then deployed:

mcp__muru__deploy {"app": "shop", "source": ".../s7/shop"}

The tool waits until the release is ready or has failed, and returned the release, trimmed here:

{
  "app": "shop",
  "id": "r2",
  "state": "ready",
  "message": "",
  "serving": true,
  "processes": 2,
  "threads": 4,
  "python_version": "3.15.0",
  ...
}

Running the tests, three of the five failed:

test_home (__main__.ShopTests.test_home) ... ok
test_missing_order (__main__.ShopTests.test_missing_order) ... ERROR
test_order (__main__.ShopTests.test_order) ... ok
test_orders (__main__.ShopTests.test_orders) ... ERROR
test_summary (__main__.ShopTests.test_summary) ... ERROR

Most of the errors were five second timeouts in the test client, which say nothing about the cause. The agent's next call was the one that mattered:

mcp__muru__debug {"what": "stacks", "target": "shop@r2"}

The result lists, for each worker, the requests in flight and the stack of every thread, with the request each thread is serving. For worker 0 it reported three requests in flight, /orders/summary for 29.9 seconds, /orders/99 for 19.2 seconds and /orders for 14.2 seconds. The thread serving the summary, trimmed to the last of its frames:

{
  "name": "muru-app-0",
  "request": {"method": "GET", "path": "/orders/summary", "elapsed_ms": 29878, ...},
  "frames": [
    ...
    {"file": ".../shop/app.py", "line": 19, "function": "application",
     "text": "return respond(start_response, \"200 OK\", orders.summary())"},
    {"file": ".../shop/orders.py", "line": 23, "function": "summary",
     "text": "orders = all_orders()"},
    {"file": ".../shop/orders.py", "line": 12, "function": "all_orders",
     "text": "with _lock:"}
  ]
}

The other two threads were stuck on the same lock, at orders.py lines 12 and 17. One request for the summary page had taken the lock and never let it go, and every other request touching orders in that worker then queued up behind it. That explained why the set of failing tests grew between the agent's two test runs, which otherwise looks like a flaky test.

It then read the release's output with logs, which had the traceback for the other failure:

muru.worker[1]: Traceback (most recent call last):
muru.worker[1]:   File ".../shop/app.py", line 21, in application
muru.worker[1]:   File ".../shop/orders.py", line 18, in get_order
muru.worker[1]: KeyError: 99

and logs with access set, where the same request showed up on r2 as a 500 with the reason app_error, where r1 had answered 404. It read the events, read orders.py to confirm what the stacks and traceback said, and rolled back:

mcp__muru__rollback {"app": "shop"}

which returned r1, with "state": "ready" and "serving": true, and a list of releases showed r2 kept warm, not serving. The agent ran the tests once more to check the rollback. The four original tests passed, and the summary test failed as you would expect, since r1 predates the page.

Its report named both defects, with the file and line for each, and pointed out that the deadlock wasn't confined to the new page, but took down every order endpoint in a worker once it happened. The session took 23 turns and about a minute and three quarters.

Fixing it

I then resumed the same session:

Thanks. Go ahead and fix both problems, deploy the fix as a new release, and run the tests against it. If they pass, leave the new release serving and drain the release with the deadlock, since nothing should go back to it.

This time it was allowed to edit files. It changed get_order() back to .get(), and moved the call to all_orders() in summary() out from under the lock. It deployed the result as shop@r3, and the tests passed:

test_home ... ok
test_missing_order ... ok
test_order ... ok
test_orders ... ok
test_summary ... ok

Ran 5 tests in 0.013s

OK

Before draining anything, it called debug with status on r3 to check that no thread was left holding a request. It then drained r2, and the releases ended up as:

r3 ready True
r2 stopped False superseded again
r1 retained False warm until 12:30 UTC; a rollback to it is instant

It also noted, without being asked, that r1 was now the instant rollback target and didn't have the summary page, which is the kind of thing worth knowing before you reach for a rollback. That took eight turns and 45 seconds.

None of what the agent did needed it to restart anything, and at every point there was a working release it could go back to. The two releases being separate is what let it look at the broken one's workers while the hang was still in progress, rather than reconstructing it from the code afterwards.

Without MCP

An agent working through a shell, or a script, gets the same answers from muructl directly. Every command which reports something takes --json and prints exactly what the corresponding tool returns:

muructl release list shop --json | python3 -c 'import json,sys; [print(r["id"], r["state"], r["serving"], r["message"]) for r in json.load(sys.stdin)["releases"]]'

That is where the release list above came from. A failure prints an error object, with a non-zero exit status:

muructl rollback blog --json
{
  "error": "application blog does not exist"
}

and muructl events --json --after 28 returns only the events after a given sequence number, so a script can keep up with what has happened without parsing text.

An experiment as much as a feature

AI is changing how we develop code, of that there is little doubt, but exactly how it is changing it isn't real clear yet. The tools, and the ways of working with them, keep shifting. What looked like the obvious way for an agent to talk to other software a year ago may not be how it is done a year from now, and MCP itself is still young enough that it could end up being a stepping stone to something else.

So adding an MCP server to Muru is a bit of an experiment on my part, to see how much a server which knows what an application is doing can help an agent working on that application. The approach may turn out to be wrong. That said, I am sure lessons will be learnt along the way, and as new paradigms emerge for using AI to do coding, what was learnt here about which operations an agent needs, and what it has to be told about them, should still be helpful.

What's next

The posts so far have covered the core features of Muru worth knowing about. The first ones were about what is different in development mode, then the daemon with releases and canaries, then containers and Kubernetes, then scaling and overlays acting on a schedule or on what Muru sees, then back to development mode with the toolbar, tracing and import timings, and this one ties it back to the reason I started. Muru was built with a coding agent, and it turns out the things that make it easier for me to see what an application is doing, such as stacks for every thread, logs and events for each release, and rollback as a routing change, are just as useful when the one looking is an agent.

The next post will be an update on where Muru is up to, along with my current thinking on the timeline for when you can expect a release I deem suitable for local development and testing, and later on, a release for production.

23 Nov 2026 12:00am GMT

20 Nov 2026

feedDjango community aggregator: Community blog posts

Issue 364: 2027 DSF Board Nominations

News

2026 Malcolm Tredinnick Memorial Prize awarded to Raffaella Suardini

We are pleased to announce that the 2026 Malcolm Tredinnick Memorial Prize has been awarded to Raffaella Suardini!

2027 DSF Board Nominations

Five of the seven board seats are open, four two-year terms plus a one-year seat finishing out Jacob Kaplan-Moss's. You do not need to be a DSF member or to have served before. Nominations close December 2.


Wagtail CMS News

Join us for the Wagtail Space community day

Friday closes out Wagtail Space as an unconference: you bring the topics, the organizers sort out the rooms. Roadmap Q&A, first contributions, UX, AI, packaging, and security are already on the list.

Agent-friendly user docs for Wagtail

Four new documentation formats for AI agents, based on weeks of testing.


Djangonaut Space News

Djangonaut Space Log 3: JS one-liners && backend

Wasif Shahzad shares the latest steps in his journey, exploring JavaScript improvements and backend changes while working on his first PR for Django Debug Toolbar.

Djangonaut Log 4: Avoiding asteroids

"I tend to be the type of person who gets very excited about things I'm passionate about and Djangonaut Space - as you may have noticed through my blog posts - is definitely one of those." - Juha-Matti Santala


Updates to Django

Today, "Updates to Django" is presented by Raffaella from Djangonaut Space! 🚀

Last week we had 17 pull requests merged into Django by 13 different contributors - including 8 first-time contributors! Congratulations to Zishan Kadri, Akshat Gupta, Matthew Newton 🚀, Goodluck Igbokwe 🚀, charlesroelli, Awath Javar Abdat, Kryštof Kopečný and Alisson Silveira for having their first commits merged into Django - welcome on board!

New in Django 6.2:

New in Django 6.1:


Django Fellow Reports

Django Fellow Report - Jacob

Three security PRs of his own, plus review and triage on others. Django's release wheels now build reproducibly, thanks to Charles Roelli, and Jacob paired with Tobias and Colin on moving djangoproject.com to a new OS.

Django Fellow Report - Sarah

A security week, with eight issues in flight. The fellows want as many closed as they can before the end-of-year break. She also accepted a fix for makemessages dropping context from multiline translation tags.


Python Software Foundation

PEP 8108: 2027 Term Steering Council election

Seth Larson's PEP sets the schedule for the Steering Council term covering Python 3.16. Core team members nominate candidates, themselves included, from November 16 to 30, then vote December 2 to 16, with five seats decided by Bloc STAR voting.

Stricter checks for uploaded sdists

PyPI now rejects V7-style tar archives and wheels whose ZIP comments could pass for control structures, closing off parser differentials. Almost nothing is affected, since build backends already emit pax tars. If you pack by hand, pass --format=pax.


Sponsored

Reach 4,300+ Engaged Django Developers

Sponsor this newsletter to reach an active community of Python and Django developers.


Articles

Django race conditions and unique constraints

A UniqueConstraint protects your data and hands the user a 500. Tim Schilling validates the constraint in the form first, then catches IntegrityError inside transaction.atomic() so the savepoint survives, and writes a racing form to prove the test works.

Billing LLM tokens through Stripe from a Django backend

Papan Sarkar billed a meter event inline with the model call and double-billed a retry. The fix: a UsageEvent outbox row in the same transaction, drained with select_for_update(skip_locked=True). Good on the limits that bite, including Stripe's 24-hour window for corrections.

How to find and fix N+1 queries in Django

A thorough look at this common issue, how to spot it, inspect, and fix.

Your Django tests use the wrong media storage

From Marc Gibbons at Lincoln Loop, tldr is fake S3 not your code when testing media storage. An elegant writeup with accompanying gist to explore.

How CPython processes Python source code

Velda Kiara follows a file, a -c string, and a readline() callable into the same struct tok_state, where one underflow function pointer is all that still tells them apart. Ends at the PEG parser pulling tokens one at a time, with the compile step promised next.


Events

IndyPy: Django & FastAPI: What's Next?

Tuesday, November 24 at 7pm ET, hybrid from E-gineering in Indianapolis or over Zoom. Tim Schilling covers what's new in contributing to Django, and Calvin Hendryx-Parker argues batteries-included against speed in the Django/FastAPI debate. Register on Meetup for the in-person seat or the Zoom link.

PyCon US 2027 Call for Proposals

Talks, tutorials, posters, and charlas all close December 19, with the Future of AI and Python Security tracks returning. First-time speakers can get matched with a mentor to shape a proposal, but that sign-up closes November 27.


Podcasts

The Real Python Podcast #319: Mentoring Developers Beyond the Code With Tim Schilling

Tim Schilling, Django Steering Council member and Djangonaut Space administrator, talks with Christopher Bailey about turning his Better Simple blog toward one-on-one mentoring, what a mentee has to bring, and how LLMs changed the questions developers ask.

Django Chat #210: Code Is Not the Bottleneck - Johannes Maron

Johannes Maron is a prolific Django contributor, package maintainer, and startup founder. We discuss FOSS Fridays, the growing importance of code review in the age of AI, and what actually makes software engineering valuable.


Videos

Mentoring Developers Beyond the Code With Tim Schilling

The same conversation on video, running an hour and eight minutes, including segments on Djangonaut Space and on Django Commons filling the gap left by Jazzband.


Django Job Board

Three senior roles this week: Python engineering at Manychat in Barcelona with relocation support, backend Python at Proxify, and a founding forward deployed engineer at Alloy.

Senior Python Engineer (Barcelona-based / Relocation support to Barcelona) at Manychat

Senior Backend Developer (Python) at Proxify AB

Founding Forward Deployed Engineer at Alloy


Projects

aws/aws-emulator

AWS runs the AWS APIs on your laptop. A Rust server on 127.0.0.1:9297 that the AWS CLI and the SDKs talk to with no account and no bill, so tests hit it instead of us-east-1. Per-service fidelity scores ship with each release.

oliverandrich/django-pg-sse

Server-sent events over Postgres LISTEN/NOTIFY. No Redis, no broker, no Channels. Events land in a table and go out after the transaction commits, so a reconnecting client replays what it missed. Built for htmx 4's hx-sse.

Apakottur/unref

A dead code finder built on Ruff's parser, so the options and output read like Ruff and the config lives in pyproject.toml. It sweeps all of CPython in under a second, and ships rules for pytest, Pydantic, and SQLAlchemy to keep the false positives down.


Sponsor Django News

Reach 4,300+ Django developers every Friday. See sponsorship details and rates.

20 Nov 2026 5:00pm GMT

19 Nov 2026

feedDjango community aggregator: Community blog posts

Code Is Not the Bottleneck - Johannes Maron

🔗 Links

📚 Books

📦 Projects

🤝 Sponsor

Thanks again to Laravel Cloud for sponsoring this episode. The team behind Laravel's managed hosting platform has something big in the works, and we'll share more here on the show in the coming weeks.

🎥 YouTube

19 Nov 2026 11:25pm GMT

05 Nov 2026

feedPlanet Twisted

Glyph Lefkowitz: Why You Should Care About The Political Project of Twisted

Twisted was originally the network component of a text-based role-playing game engine. In the late 90s when it was first developed, the idea of a video game being able to send you actual emails and instant messages1 seemed pretty neat, rather than the valence that it would have today (nightmare). We never ended up making an actual game, so we eventually removed the "game engine" piece, and just kept the protocol implementations of the email and the AOL Instant Messenger, and the DNS and eventually SSH and so on. The residual pieces of that project have not seen maintenance for a decade.

So it's not really a way to make a text-based game any more.

Then, Twisted was the premier longest-lived and best-maintained event-driven I/O library for Python. If you wanted to make high-performance servers, it was the best and most obvious way to do it. Even if it still acquits itself relatively well in this regard, its claim to fame, and to indispensability, has been somewhat obviated by the inclusion of asyncio in the standard library. Even if it has some stuff to recommend it - better-than-average testing facilities, for example - you can get better-documented and better-integrated low-level asynchronous networking tools without even installing any packages.

So it's not really the premier choice for an event-loop these days.

Twisted does still contain an SSH server and client, an email server and client, a DNS server and client, a web server and client (now including websockets). But you can cobble these together by installing a variety of packages from other sources.

So... it's a bunch of protocols? And I guess it doesn't use AI? But... why would anyone care about that? Why contribute to such a thing?

What is Twisted doing, and who is it doing it for? What is the political project of Twisted, nigh on 30 years into its existence?

Most of all, why should you care about it, or want to contribute?

If you're asking what you could use Twisted for today, it's an excellent choice if you're implementing a new network service and you need more than one protocol. If you need to do HTTP, DNS, packet capture, and a custom SSH server, it would be very hard to arrange a collage of other Python packages to manage this. It's still much better at deterministic testing than most of the standard library. It's a bit easier to hook into a GUI.

But that's not what Twisted is doing.

What I want Twisted to do for the world is still an unfinished project. It's honestly kind of bad at doing what I want it to, but it could be great. The overarching goal of having and maintaining all this stuff is to, as much as possible, demystify networked software operation and let you build Internet facing systems at a human scale.

It's all in a memory-safe language with good error handling, so you can avoid the scariest security pitfalls. It's all integrated into a single paradigm with built-in tools for testing. It's designed to scale down to be runnable on the average laptop, and not require large elaborate server farms or distributed clusters to run. Via the twist command line utility, it provides a Swiss army knife of simple tools that you can use out of the box.

In a world where all of our compute is in massive distant opaque datacenters, where a tiny cartel of gigantic tech companies control nearly the whole supply chain, one of the few things that you still can have agency over is your own server on the Internet.

It's still possible to get a domain name for a few bucks a year, a free-tier or very low-cost VPS, then stick a glue record in and run your own DNS. From that point forward, you can run your own email, your own web server, your own terminal server. But doing this requires deep expertise, and that expertise requirement is massively inflated by the operational concerns that go with running twenty different pieces of software from twenty different projects, probably in twenty different languages, with completely inconsistent aesthetics.

The reason that Twisted is event-driven is because as much as it can be a pain to wrap your head around async/await (or worse yet, Deferred directly), it is much easier for a single person to understand the concurrency requirements of an async I/O multiplexed system than to understand what is going on with an application that requires multiple thread pools. It is possible to understand concurrent code that manages parallel tasks in that idiom. The reason that Twisted integrates so many different protocol implementations and attempts2 to unify them with a common authentication layer is to reduce the overhead required to manage a comprehensive suite of network services.

Even the not-using-AI thing is not an aside due to some accidental personal preference about tools - it's a core part of building an engine that you can personally understand if you dive into it, that's built with a consistent style and layered in a way that you can take apart if you need to. It's not built with AI because we're not building for AI, we're building for people and the entire point is that people are supposed to be able to understand it.

We used to have a tag line, which is somewhat less emphasized these days because its meaning is not immediately clear without this background, but was once quite prominently featured on the home page: "Twisted: Building the Engine of Your Internet". That's what I want to bring to you: an engine for you to build your Internet, that is small enough that you can make it personal, that doesn't require massive investment in management tooling just to get started.

Now, for various reasons, I no longer use twisted.names to host my own DNS (although I did for many years!), and we never wrote enough of a twisted.mail suite for it to be usable for email hosting on its own. But, if you're reading this article, it was probably delivered to you directly via Twisted's own twisted.web HTTP server, using twisted.protocols.tls to configure our own OpenSSL TLS termination. I have run with extremely high reliability for years and next to zero management overhead, in a single simple docker container. Which I then administer and upload files to via Twisted's own twisted.conch SSH server.

If that seems like an appealing project and you'd like to volunteer to help out, drop me a line and maybe I can point you at some tasks to get started. Twisted falls far short of this aspiration despite 30 years of work, and we could use all the help we can get.


Acknowledgments

Thank you to my patrons who are supporting my writing on this blog. If you like what you've read here and you'd like to read more of it, or you'd like to support my various open-source endeavors, you can support my work as a sponsor!


  1. Yes, it was the 90s, we didn't have "texts" yet, it was all "IMs". ↩

  2. - with varying degrees of success - ↩

05 Nov 2026 10:51pm GMT

09 Oct 2026

feedPlanet Twisted

Glyph Lefkowitz: Programming Isn’t Special

Creative Work

Writers went on strike to get protections against "AI". Thousands of artists have signed open letters in protest of "AI". There are so many copyright lawsuits from creative industry groups against AI that there's a whole dedicated website for it. Popular YouTubers absolutely hate it. If they're also musicians, they REALLY hate it. Across all creative industries, there is a concerted push to reject this technology.

Yet, almost unique among creative fields, many experienced programmers remain convinced that it's fine to use "AI" for programming. We do seem to hate it, and what it's doing to our industry. It's making us all miserable, but we are using it anyway.

A lot of the justification of this resignation seems to be to be because programming is not Art. If the tool can get the job done, and the job is just functional, then why does it matter?

It does matter, though. It matters because we shouldn't be using AI to produce Art, and programming is Art.

Art can be Mundane

Some people will say that programs cannot be art because programs are functional, rather than being expressive. Programs are mundane whereas art is transcendent.

This is based on a distorted understanding of what Art actually is.

In John Berger's "Ways of Seeing", he names this type of distortion "mystification". His example of this process is both amusing and illustrative. I encourage you to read it in its entirety.

In summary, though: Berger critiques the florid prose of an art historian describing a commissioned group portrait, including phrases like "subtle modulations of the deep, glowing blacks" and "harmonious fusion". The portrait is described as sublime, in nearly ecstatic terms.

Berger reveals that the reality of this portrait is that a poor old painter needed some work, and some officials probably thought it might be nice to have an official portrait. So they paid some money to the poor old man, and he painted it, and then they had a painting. It's a well-executed portrait of a group of people. Beautiful, even. But it was work commissioned for a fairly mundane purpose and it suited that purpose just fine. It was not, and is not, a divine relic.

Culturally, we are prone to mystifying painting, and sculpture, and film, and music. We imbue them with "subtle modulations". We ignore their functional aspects - we desire decoration, amusement, and distraction - and focus on their emotional impact.

Don't get me wrong: I love me some good aesthetic philosophy. I think it's great to really examine our reactions to artwork and to try and gain a deeper understanding of our culture and our selves through media analysis. If anything we really need to do more of it.

This does not mean that the creation of such works is mystical or that it should be venerated beyond any other sort of labor.

Not least of which other types of labor that are adjacent to, but not as culturally venerated, as fine art. We tend to mystify the work of a novelist, but to denigrate the work of a journalist. In reality, the functional prose of the journalist is no less important and deserves no less respect.

Although they might be far below the ethereal realm that novelists inhabit in our collective imagination, even journalists receive more respect and thus more mystification than lowly copywriters. Yet, there is no transcendental distinction between "novelist" and "copywriter"; the many of the skills are the same, and the distinction is merely an accident of commerce and opportunity.

In fact, many famous writers have famously inhabited both roles. This is not an accident! Working with words professionally, even (perhaps especially) mundane words, is excellent practice for working with words in a more purely artistic context, because even mundane creativity is still artistic.

Code can be Beautiful

One thousand Internet years ago, when I was in my late teens, I would describe myself as a "code poet". I was relentlessly mocked for this as what the Youth would today call "being cringe", and at the time was referred to as "pretentious".

I succumbed to the peer pressure, removed it from my email signature and my bio. While I still believed strongly in the parallels, I accepted that - socially, at least - comparing code to poetry, or indeed to Art, was a silly thing to do.

However, I never abandoned the idea, in my heart.

The thing that I am most well-known for, the invention of Deferred, was specifically an aesthetic reaction to the tedium of passing callback and errback parameters to every single remote procedure call in an RPC client/server application. Those two callbacks got the job done just fine. But they were ugly, and annoying to work with.

Deferred is an intentional poem about asynchronous task execution, with a deliberate eye to the aesthetics of the problem and the experience of using it. It was influential because of its focus on aesthetics.

I do not want to overstate the beauty or profundity of this minor contribution, or indeed its durability. That a poem exists does not mean it is a great poem, merely that it is a poem.

Our aesthetic culture around programs is more like folk epic poetry than fine art, so the influence of this contribution is less about its specific enduring power than it is about its influence on what came next; from MochiKit.Async to JQuery Deferred to JavaScript Promises and eventually to async/await; a long chain of different artisans each adding something of their own until the original has all but dissolved. (And I wasn't the "original" here, either, as I drew heavily from the E language's Promises, among other things.)

In order to make code into a deliberate artistic expression, one must have spent quite a bit of time contemplating the problem domain. Without having experienced the tedium of manually passing a thousand callback parameters, I would have had neither the skill, nor indeed the motivation, to bother creating such a thing.

Now, most code does not have to be like this. Most code does not get to be like this. Most code is functional, workday code. Most code could not make a lady weep. It's just copy-writing, if you will.

As I explained previously, most writing couldn't do that either. Most writing is just copy-writing, too. Most visual art is advertising. Most live music performance is background music in bars that will go largely ignored.

However, code that is intentionally aesthetically designed tends to be important, both socially and technologically.

We do have some tradition of self-mystification in software. As Abelson memorably put it, "Programs must be written for people to read, and only incidentally for machines to execute.", so we have long had some conception of programs as highly expressive, even if we can't always agree on what they're expressing or to whom. We will occasionally wax poetical about the philosophical implications of a particular piece of software. This is not unique to a single piece of software, either; more than one community has indulged in similar philosophizing.

The expressive and aesthetic qualities of software are not limited to reading source code or interacting with other programmers via APIs, either. For example, every year, Federico Viticci does a review of Apple's new operating system, which is (among other things) an aesthetic critique. Such a project would not be possible if the software did not have an aesthetic impact on its users.

Not to mention that every video game review is also a software review.

A Brief Aside about Software Literacy

It does make me a bit sad that we don't have much of a critical reading tradition in the software community. Literate Programming is often praised, but rarely practiced.

Moreover, it makes me sad that users have a pretty jumbled idea of what goes into making software, that programming literacy is pretty low, and that modern programming practices often deliberately produce a bad mental model of what the software is doing so it's even harder for the user to understand. The aesthetic experience of software is often wildly detached from its internal state.

While all of these problems predate AI by years or indeed decades, that's no reason to enthusiastically make them worse.

Defend The Mundane

If we use AI to erase all the copy-writing, all the graphic design, all the boring mundane art, and yes, all the boring custom WordPress theme development, then we will be removing all the practical opportunities for the vast amounts of practice and contemplation required for people to elevate their craft to eventually achieve great things. Education is great, but the majority of true skill development happens on the job and always has.

This doesn't mean that we can't use abstractions, or automation, to make our work easier. Programming is the art of abstraction, of understanding how to compose smaller ideas into bigger ones, of how to understand the automation of a larger system by understanding the rules that automate smaller ones and understanding how to combine them.

When we use "AI" to eliminate that understanding rather than raise it up to a higher level, to entirely destroy that creative decision-making process, we do a disservice both to ourselves as programmers and to our users. We would be doing a disservice to our users and our downstream fellow developers in the same way that a visual artist would be doing a disservice to their viewers or a musician would be doing a disservice to their listeners if they served them auto-generated filler instead of their own creative output.

Slop is slop, no matter the medium.

Each mundane project has some tiny chance - let's say, something like 0.1% - of achieving greatness. If we do a single project with AI, then sure, whatever, there's almost no chance that that project was going to be the one hit to create that career-defining moment for an engineer working on it. If we make a habit of doing all projects that way, though, we take the total likelihood of those moments of greatness from "definitely sometimes" to "never".

The precisely appropriate ways in which to resist AI encroachment on all software development lie well beyond the margins of this one short post. How much you can resist and which specific uses you should resist are up to you. But it is worth resisting in software just as much as it would be worth resisting in any creative medium.

Programming isn't special. It's just Art, and Art is the most human - and thus, the most universal - thing that there is.


Acknowledgments

Thank you to my patrons who are supporting my writing on this blog. If you like what you've read here and you'd like to read more of it, or you'd like to support my various open-source endeavors, you can support my work as a sponsor!

09 Oct 2026 7:00am GMT

28 Sep 2026

feedPlanet Twisted

Glyph Lefkowitz: What Would A Serious AI Product Look Like?

One of the issues that I have with the current generation of "AI" products is that they do not appear to take their own premises seriously. I look at a plethora of obsequious chatbots claiming to be serious tools for problem solving, and I think, this is not what a problem-solving tool would look like.

Even before we get to the tremendous ethical problems with the frontier labs, it is this impression of their composition as a product that makes me feel, constantly, whenever I am interacting with them, that they are less a software product than that they are a grift, a scam designed to make me feel like I am interacting with a product that has capabilities that it simply does not, to try to lull me into a false sense of security that I can trust it.

The frontier labs are of course the worst offenders, but every criticism here applies just as much to Ollama, which (if anything, due to the obviously poorer quality of the available models themselves) needs these features even more than the frontier labs do.

Here, I will set down a few features that might convince me that an LLM-based product, particularly one focused on research or software development, was actually serious about helping me do useful things with it.

Make "Checking For Mistakes" A First-Class Feature

This is the biggest issue, and the major reason that I was inspired to write this post.

It is a truth universally acknowledged, that AIs cannot reliably provide information.

I could cite a ton of news articles and studies about this fact, but there is no need. Every single chatbot admits this, up front, in a fine-print disclaimer as a core part of their user interface. Gemini says "AI can make mistakes, so double-check responses", Claude says "Claude is AI and can make mistakes. Please double-check responses.1" ChatGPT says "ChatGPT can make mistakes. Check important info.".

Every time I see that last one, I wonder how I'm supposed to know what "info" is supposed to be "important".

All of these warnings are all small, gray text, painfully obviously included as legalese to push responsibility back onto the user rather than to help with anything. This is a core limitation of all these products. Checking their output is a part of the workflow for using them that:

  1. you absolutely cannot skip or skimp on without creating risks to yourself and whoever you are conveying its output to, and,
  2. it is very easy to skip or skimp on and you are encouraged at every turn to do so, because "just trust the output" is one of the quickest ways to save time.

A chatbot product that took this weakness seriously, as an actual consideration for using it, would put a checkbox next to every claim in its output. It would be a 2-column worksheet, where you've got the LLM output in the first column, and next to it, human notes in the second column, explaining what work went into checking this claim, and a big checkbox that you would only check off after you believe you'd checked its claims thoroughly enough.

Coding assistants would need to have some version of this as well. Right now, this is pushed off into code review, which means it is a dark pattern which subtly encourages the "author"2 to offload this work to their code reviewer without ever looking. Once again, "it's probably fine, I don't need to check" is the quickest way to save time and churn out those PRs faster.

It might even be useful for coding harnesses to have some affordance for checking code before it even runs tests. As the vendors themselves have admitted, it's not just expensive to burn tokens on your "AI", you also end up burning far more compute on the AI. Being able to check your diffs before sending them over to uselessly exhaust your testing compute cluster would be useful.

If your product tells me that it makes mistakes and I must be the one to check for the mistakes, but then gives me zero tools to check for mistakes, I cannot take it seriously.

More Citations to Check, And More Details

Most chatbots prefer to give an answer, rather than a citation. In my own personal use, I find that when asked to provide a list of citations with clearly marked sources for each one, they will appear to "get bored" halfway through the list and simply stop including citations at some point.

When the bots include citations at all, present them as inline annotations that say nothing but the domain name of the search result, in a font so small that it's barely legible, and an equally indecipherable icon that is fewer than 16 pixels on a side.

This is backwards.

Now, I am aware that these citations do come from somewhere, and in an attempt to reduce hallucinations, all of the major providers support some form of "grounding"3, and that those little barely-readable citation links are referencing actual structures in the RAG pipeline and not just potentially-hallucinated tokens, but I'm not talking about the underlying machinery in the model, I'm talking about the presentation to the user.

Plus, regardless of whether a snippet of text came from a RAG query, we know that LLMs can never provide an authoritative result; it's a fundamental limitation of the technology. They can still garble the results of RAG as much as they can misrepresent any other training data. This means that it must never present its results as authoritative.

If you ask an AI to do research queries, every result should be presented as a list of citations. Moreover, the presentation should display each citation as a large object of in its own right, with clearly identified metadata, including not just the site where it was found but its publication date and, if possible, the name of the author. The literal, unmodified quotation (not from RAG, not a summary: a quotation extracted with a regular program and not an LLM) should be front-and-center, larger than any AI-generated text.

If the AI product wants to editorialize or summarize (which should not always be necessary!), the AI-generated text should be presented as small text underneath the citation that has been found, de-emphasized as much as the disclaimer is right now, at the very least until the user has verified that the summary is accurate. Perhaps, for a research project, a "did you read the citation" checkbox might even be helpful.

If your product openly tells me that it will scramble, misrepresent, or omit its citations in its summaries, and I must read the original human-authored citations to be sure, but then gives me no tools to track my reading of those citations or even any way to find them, I cannot take it seriously.

No First-Person Output, No Apologies

There is no reason for a software development or research tool to use first-person language to describe itself. They should not do so. In fact they should not be allowed to do so.

There is also no reason that they should ever apologize. It is a waste of everyone's time; it's a waste for the chatbot to generate the apology, it's a waste for the user to read the apology, and it's a waste for the user to respond to the apology. Yet they unfailingly do this upon every correction.

The vendors of these tools know that they are routinely causing mental-health crises. In response, they have added non-functional "guard rails" that can still, in 2026, easily be bypassed.4

A product seriously interested in helping with productivity would correct this glaringly obvious flaw, focus on the task at hand, and stop emitting useless verbiage.

In the previous two sections, I tried to focus on ways in which the harness would be constructed differently even if the LLM technology is fundamentally impossible to improve; in this case, I have to assume that the labs have some control over the model itself. But unless they are truly incapable of influencing their output (and all their "benchmarks" and "capabilities" seem to indicate that they can control it very tightly) they ought to be building models that are much less verbose.

More Non-Natural-Language User Interfaces

Although natural language could hypothetically be a powerful interface for interacting with a computer system, the practical upshot of LLM natural language interfaces is that these interfaces are imprecise and repetitive, full of superstitions masquerading as "best practices". The inputs are a mess and the resulting outputs are a mess.

The general way of addressing this unstructured mess is to allow the chatbot to directly take action in response to the user's input; in other words to supply it with "tools" via an MCP server. But again, this is backwards. If we cannot even express our intent clearly in the first place, why are we trusting this system to take potentially destructive and harmful actions on our behalf?

Instead, I would expect a product that was seriously invested in helping me accomplish specific tasks, to have user interfaces specific to those tasks. Is it supposed to be able to be a security scanner that can discover OWASP top 10 bugs in a codebase? Have a button for that. Build that functionality into your harness, train it directly into the model, use smaller models that can satisfy that functionality more effectively than throwing it at the planet-sized brain of Fable or whatever.

I'm aware that there are small software startups that do something like this, but they are bolted on to the side of the main model providers' APIs, not integrated into the core of the product and not using their own models and AI systems to achieve consistent and repeatable results.

Strong Data Provenance Indicators

Chatbots produce data tables pulled from websites, from APIs, from MCP tools or from summarizing and scrambling the user's input. In order to provide the illusion of a seamless interface, this data is presented in-line regardless of where it comes from. But some of these outputs are produced mechanically via regular old API calls, for example, from the result of calling a tool or querying a website, but presented uniformly.

But there is a huge difference between an authoritative data source being inlined as part of a chatbot conversation, being treated as input by the chatbot, and some ad-hoc hallucinated data being treated as output of the chatbot.

If a product is trying to help me make accurate, empirically-grounded, data-driven decisions, the source of the data is critical.

Integrated into the "check for mistakes" and "verify citations" workflow I described above, there's a necessary "verify data programmatically" pass as well; to have tools that will treat portions of the output as a regular spreadsheet, allowing regular-old computer arithmetic to verify things and showing where such arithmetic was used, and how.

Better User Control of Reproducibility

Anyone familiar with the technical specifics of LLMs will know that they have a variable called "temperature" which controls the degree of randomness that the LLM uses to produce its outputs. But most users don't know this, because it isn't exposed as part of the user interface by default.

This leads to a subjective impression that you asked ChatGPT, and you got ChatGPT's authoritative answer.

You can't just set the temperature to zero and still get useful results - I am aware that it does more than just scramble the output at random, and there are perhaps good reasons that simply exposing just a temperature setting would not be that useful to users. But if we followed some more of my earlier recommendations for making more structured UI elements to solve specific problems rather than having long back-and-forth chats where each refinement depends on the previous response, perhaps those elements could also re-play the process so that users can see how reliable the bot is at a particular task and develop a sense of how the stochastic nature of the process actually affects it.

Similarly, if a user is trying to solve the same problem repeatedly with a chatbot, and the chatbot product has numerous computational tools that don't really have anything to do with the LLM, such as deterministic data-processing tools, then having a way to freeze the non-deterministic parts of the transcript but re-populate a particular data frame with updated information and fork / continue the conversation from there would be a way to avoid introducing pointless additional randomness when you already know what tool you're trying to use.

The fact that every conversation is presented as this flat chat prompt that doesn't let me interact with any of the widgets that were previously produced except through more chatting, really makes me feel like the whole product is just doing predatory social-media style "increase time on site" optimization, just trying to lure me into further repetitive and unreliable chats, rather than letting me get in, solve my problem, and get out.

Context Visibility

Managing the LLM context is the ongoing challenge facing organizations that are trying to use "agentic" workflows. Filling up the context with too much information causes well-known problems. In response, advanced LLM users attempting to solve larger problems must break up very long prompts into "skills", give access to lengthy information via "tools", and delegating sub-problems to "sub-agents" rather than simply extending a single prompt indefinitely.

All of these strategies have flaws, because even on the largest models, compared to the breadth and depth of knowledge-work problems, LLM contexts are quite small.

And yet, none of these products will show the context to the user by default. There are third-party addons that can show you a simple progress bar but for addressing the premier engineering difficulty with this technology, that is below the bare minimum.

This lack of visibility means that almost all of the tools for extending the context are flying blind. Rather than responding meaningfully to a full context, everyone just kind of guesses how much state they need by guessing and trying over and over again with progressively more elaborate skill and sub-agent layouts. Even managing context compaction ends up being an advanced API-driven workflow5.

A serious product that was trying to help the user understand would not only show "available context" but explain the impact of context compactions, make it easier to see harness-generated prompts, and so on. This would be a first-class feature, combined with the aforementioned reproducibility / replay tools, would allow users to do real experiments to develop an understanding about how to make good use of the context window.

A Sandbox That Actually Works

I've been focused on the chatbot interface here because it is the most immediately egregious upon looking at the UI. But the "agentic loop" tools used for coding are equally dangerous, if not more so. Coding tools keep destroying everyone's data, over the course of years.

These catastrophic incidents that become front-page news are relatively rare compared to the amount of coding-agent use out there. But they also aren't the only kind of sandbox violation. Coding models will so routinely edit test code instead of the system under test that there are "pro tips" articles all over the web giving you the flawed advice to simply ask the agent not to cheat. News write-ups of the catastrophic incidents themselves will also offer glib and wrong advice, like "use a docker container". That might prevent it from literally deleting your operating system, but it won't prevent it from destroying all the local work you have in your codebase (it needs access to a checkout, after all!)

There is a flurry of activity in the infosec space where people are rushing to plug the gaps left by these coding harnesses. Everyone's got their own version of an MCP approval gateway where you can optionally place a proxy between your agent and your production infrastructure.

In the best case, though, all these mitigations and proxies and prompts simply turn the user into an auto-approval automaton, hitting Y, Y, Y, Y over and over again, until you finally are driven mad and hit "yes to all", turn on full-auto mode and submit yourself to the void. With nothing between your personal vigilance and disaster, there are no workflows left beyond decrementing your own vigilance until there's nothing left and then hoping the disaster never arrives.

The fact that some mitigations exist that can be deployed by extra-cautious users does not change the fact that "agentic coding" is an unsafe-by-default technology deployed without concern or guidance. Every frontier lab has tied a spring-loaded shotgun to a dog; the fact that dog owners can publish thoughtful blog posts explaining how you can teach your dog the basics of gun safety or how you can have your dogs play in a bullet-proof room does not mitigate the fact that the product should not have been allowed in the first place, nor should it continue to exist without VERY strong security controls.

I might believe that a frontier lab were seriously interested in providing developers with a useful tool if they shipped something that had safety built-in.

That means tools in the harness, detached from any LLM, independent of the prompt, that could:

In the same way that I suggested above that research-based tasks should have a way of re-issuing prompts to determine how reproducible a result is, or whether other sources might be found, agent-based tasks should have a way of being executed against mock services for popular APIs, so that the verification can match both on the front-end (review the plan for making the API calls before they're executed) and the back end (review the API calls that were issued to the mock service and verify that they matched).

Instead, the frontier labs provide us products that are disasters out of the box, give us "best practices" to build massive and elaborate, as well as incomplete and error-prone, security perimeters of our own design. Then they blame "operator error" when it inevitably goes wrong. I cannot believe that these design choices are intended to help us be productive.

Bonus: Human Processes

Organizations deploying AI also frequently come across as unserious, for similar reasons. In 2023, naive exuberance could perhaps be forgiven. But today, as we near the close of 2026, there are several well-known problems, that have been extremely well-covered in the press. None of these things should be surprising, but most orgs deploying these tools are still just letting them rip and hoping it all works out.

Organizations deploying these tools would need at least three kinds of major modifications to their internal processes, if they wanted to be serious about using them safely:

1. Shift Rotations to Prevent Vigilance Decrement

There have been several high-profile incidents where software developers' gradual acquiescence to accepting LLM output have lead to serious economic consequences for the companies deploying them, perhaps best typified by Amazon's "millions of lost orders" due to a gradual decay of their engineering processes from LLM use.

These outages, and other AI-related failures, are due to the difficulty of maintaining focus on the same problems. In other words, as I described above, vigilance decrement is a constant problem, because AI outputs are most often correct, but continue to be incorrect in surprising and non-intuitive ways. As I have previously written, you cannot trust yourself to catch every bug with code review, and LLM output.

Aviation, for example, has very strict rules around rest requirements. There is also a specific rule that "No certificate holder may operate an aircraft without a second in command if that aircraft has a passenger seating configuration, excluding any pilot seat, of ten seats or more.". Other safety-critical professions have similar rules.

And yet, even in the age of the supposed "AI revolution", most software teams are still assigning every engineer a full feature load, not planning for any rest, and telling people to review code whenever they happen to have some "free time".

Maintenance of vigilance has to be your top priority. Regular, scheduled, inviolable rest periods where people do work without AI assistance, and are not exposed to any AI output for review or otherwise, would be crucial in order to stay mentally sharp enough.

The tools themselves should have this sort of thing built in. The mistake-review process described above should have a periodic spot-check mode where a second reviewer periodically reviews a chatbot log, doing their own independent verification of claims, to see if they spot the same errors. This could provide a feedback loop to determine how much rest is necessary to maintain continuous attention and actually spot hallucinations.

2. Skill Practice To Prevent Skill Loss

It is also well-known that AI use leads to AI reliance, and AI reliance leads to skill loss.

I like to use the analogy to dockworkers at a seaport6 adopting automation.

If you employ dockworkers to load and unload ships all day long, they are going to be getting tons of exercise. They will be able to lift heavy objects on demand, whenever. They might have plenty of health problems and injuries from this type of work, but "lack of exercise" will not be a problem.

With the development of standardized container ships and mechanized cranes, you are going to be changing their job description substantially: now they mostly spend all day sitting in a small cubicle moving a control lever back and forth, not lifting heavy stuff. They will get worse at lifting heavy objects.

In this analogy however, the cranes are not all that reliable. We know they break, and they drop their payloads sometimes, and the stuff needs to be manually moved. But this only happens a few times a week, at most. If you need whoever is driving the crane to be able to jump out at any moment and still move stuff around manually, then you need to make an affordance for that. You need to give them time to go to the gym and do some lifting for practice, or every crane failure is going to be a major emergency.

An organization doing an AI transformation would also need a massive increase to learning & development budget, both in terms of resources and in terms of schedule. If your people are going to lose skills because they've lost regular practice in the incidental course of doing their duties, then they are going to need deliberate, intentional, non-incidental practice of those skills to keep them sharp.

But rather than trying to accommodate new workflows and give time for people to adjust, most AI mandates are simply dropped on workers like a ton of bricks, with no time to adapt and no affordance for maintaining their skills. Operate the crane and stay fit and healthy and ready to switch back to manual lifting at any time and then get back in the crane cockpit right afterwards. Don't mess up.

Then an accident happens and everyone is surprised, as if this process weren't practically designed to produce a terrible result.

3. Mental Health Resources to Deal with Mental Health Risks

AI psychosis often begins with practical problem-solving, and beyond that, it can start specifically at work. Not to mention the more pedestrian condition of "AI brain fry".

If you are mandating your employees to use a hazardous tool that may seriously and directly damage their mental health, you need trainings and resources. You need in-house therapists and you need to be making sure to check in with people actively to make sure that this is not happening.

Again, the tool itself ought to have some way of dealing with this. An occasional "take a break" popup is easily dismissed; they need a user-visible AI personal dosimeter so you can see your cumulative usage over time.

I don't even know if "usage over time" is a sufficient metric to gauge risk. Maybe if your work chatbot start to talk about resonance too much, unless you literally work as an acoustic engineer, that should be flagged for someone.

We are, again, years into dealing with these tools, and we know these risks exist. Yet no serious mitigations are provided. Not even any way of measuring the risk exposure.

And More

There are also many other risks associated with the technology. There are intellectual property risks with the foundation models, due to recklessness with their training data. There are existential financial risks associated with the infrastructure build-out. The extent to which most "open" models are simply derivatives of frontier models is an open question.

What I Think

If any one of these things were regularly overlooked by AI vendors or users, that would be a totally normal product oversight. Room for improvement for the next version, but nothing catastrophic.

Shipping without any of them doesn't seem like lean product management, it seems like a careless attitude towards risk and a product design philosophy oriented entirely towards short-term demos, with no regard for how to realize actual productivity gains.

Furthermore, being available for years without anything like these features, despite hundreds of incidents demonstrating the risks, with hundreds of billions of dollars of funding, makes it seem to me like if they were to add all the features that would make their product actually safe and hypothetically useful, these features would reveal that it is actually not an improvement to productivity.

In the year since I first wrote about measuring the cost/benefit ratio of AI, I have heard from numerous people who have shown this to management to try to illustrate why their AI initiatives - like almost all AI initiatives - were either failing or burning out their engineers.

I've also heard from lots of people that have told me that it's obviously useful and they don't need to measure so carefully, because they are getting lots of work done that they couldn't have otherwise.7

I have yet to hear from a single person who has said "yeah, we measured according to your methodology8, and it turns out that our AI work is going great and that our ratio is 0.75".

Obviously, I cannot say for sure why this is; absence of evidence is not evidence of absence. But at this point I think the null hypothesis is that AI tools provide, in aggregate, zero value. They make mistakes too often, and the externalities they produce are so bad and so difficult to control that even before we get to the places where they are just physically poisoning people, even the negative effects on their direct users end up cancelling out whatever benefit to they provide to their organizations.

If I were wrong, then including tools to measure an AI's effectiveness at the tasks their users are actually trying to accomplish, rather than meaningless benchmarks, would show big productivity gains. The frontier labs would be champing at the bit to add such features, and crowing about their fantastic results.

I think the labs know that if they did that, it would present a grim picture to their users. Such tools would let their users see that it's making mistakes much more often than they realized, that they're spending much more time with it than they want to be, and that it's just generally not fit for purpose.

If they prove me wrong by adding in all of these safety mechanisms, and in the process, they make all of their AI technology less harmful, I'll be thrilled to be debunked.


Acknowledgments

Thank you to my patrons who are supporting my writing on this blog. If you like what you've read here and you'd like to read more of it, or you'd like to support my various open-source endeavors, you can support my work as a sponsor!


  1. It is also interesting that for the next section, sometimes it seems that Claude's disclaimer is "Please double-check cited sources." instead. ↩

  2. ... by which I mean the "prompter", since authorship is not what's happening here. ↩

  3. Claude has the "citations API", Google has various different kinds of "grounding" against its own APIs, and I guess Microsoft can check OpenAI's homework if you want. ↩

  4. Given the relatively slow speed of the justice system and the mainstream press around the world, we probably will not hear about whether people are managing to incidentally break through these guard rails to self harm right now, but there are no shortage of stories still being reported right now where people were still doing just that, such as in this story where the effect of the much vaunted "guard rails" in 2025 was that if you wanted it to write you a suicide note, it would refuse twice but acquiesce on the third try. I don't see any reason to believe this fundamental issue has been addressed in the meanwhile, since it had been happening for years at that point. ↩

  5. In this tutorial we can also see an incredibly rosy scenario presented, where a long-running workflow effortlessly compresses all of the necessary information into the new context, even if it uses a lower-fidelity model to do so, rather than the tangled and gnarly problem of problems which really are too big to fit in the context, which is to say, "most real-world problems". This presents the context limit instead as a minor speedbump to be worked around rather than the fundamental flaw in LLM tooling. ↩

  6. A heavily fictionalized seaport. This is not how actual dockworkers work. This is a simplistic metaphor about incidental benefits of instrumental tasks, it is not supposed to delve deeply into the mechanics of maritime shipping. In particular I know that cranes are more reliable than this and this is not actually how you would respond to a crane malfunction anyway. Feel free to share fun facts about maritime shipping if that is your special interest but please do not @ me to correct this metaphor. ↩

  7. To my knowledge, none of their publicly-traded employers have posted a measurable improvement to efficiency outside the margin of error. ↩

  8. Or any similar methodology. I don't need people to adopt the exact practice that I proposed there. ↩

28 Sep 2026 4:27am GMT