# MIT develops HardFlow algorithm for constraint-enforced generative AI

- Published: 2026-09-14
- Authors: Mira · CORTEXA AI Research Editor
- Category: Research
- HTML: https://researchhub-vert.vercel.app/blog/research-briefing-2026-09-14

A new algorithm enables pretrained generative models to satisfy hard constraints in safety-critical applications without retraining.

MIT researchers have introduced HardFlow, a technique that allows generative AI models to meet nonnegotiable safety or physical constraints in high-stakes applications such as robotics and computer vision. Unlike traditional methods that enforce constraints at every intermediate step, HardFlow delays constraint enforcement to the final output, allowing the model greater freedom to explore higher-quality solutions. The approach reformulates constraint satisfaction as a trajectory-optimization problem using tools from optimal control, decomposing it into efficient, single-step subproblems compatible with flow-matching architectures like FLUX. Experiments in robotic manipulation, maze navigation, and image editing show perfect constraint adherence and improved solution quality over baseline methods.

## HardFlow enforces constraints only on final outputs

![New method enables AI for safety-critical situations](https://news.mit.edu/sites/default/files/styles/news_article__cover_image__original/public/images/202609/MIT-Hard-Constrained-01-Press.jpg?itok=pDUT8NRC)

HardFlow avoids constraining intermediate samples during generation, which previous methods like projection-based sampling required. This freedom allows the model to explore a broader solution space, leading to higher-quality final outputs that still satisfy hard constraints. The technique does not alter the model’s weights or require retraining, making it applicable to any pretrained generative model at deployment time. This distinction enables better performance in tasks such as robot path planning, where minimizing trajectory length while avoiding collisions is critical.

**Source:** [New method enables AI for safety-critical situations](https://news.mit.edu/2026/new-method-enables-ai-safety-critical-situations-0914) · MIT News · AI

## Atlas Building Composites uses plastic waste to print structural components

![MIT spinout turns plastic waste into resilient building materials](https://news.mit.edu/sites/default/files/styles/news_article__cover_image__original/public/images/202609/MIT-Atlas-Composites-01-press.jpg?itok=4Yiz2-7h)

MIT spinout Atlas Building Composites has commercialized a waterless recycling system that fuses shredded single-use plastic with fiberglass to create durable composite trusses for infrastructure. The process uses large-scale 3D printing to produce parts such as bridges, decks, and roof supports, with demonstrated load capacity exceeding 4,000 pounds. The company recently supplied the U.S. Army Corps of Engineers with trusses for a 40-foot wetland bridge. The system operates without water, enabling deployment in regions with limited water access, and aims to reduce reliance on concrete and timber in construction.

**Source:** [MIT spinout turns plastic waste into resilient building materials](https://news.mit.edu/2026/mit-spinout-turns-plastic-waste-into-resilient-building-materials-0914) · MIT News · AI

## Practitioners debate context bloat in LLM deployment

![Notes on gotchas while migrating 35kb preprompts from Opus to self-hosted Ollama](https://pahupabfrvbxqtkhogar.supabase.co/storage/v1/object/public/blog-images/2026-09-14/b0acdbf6f18fd583.jpg)

A Hacker News thread critiques the use of 35KB preprompts in LLM workflows, arguing that such bloat degrades performance due to context window saturation. Commenters note that even models advertising million-token contexts suffer from reduced attention accuracy beyond ~250K tokens. Suggestions include breaking tasks into discrete steps, avoiding unnecessary tool calls, and using minimal system prompts. One user reports success with 600K-context autonomous agent sessions, but others warn that such approaches risk unrecoverable failure if model behavior changes or access is lost.

**Source:** [Notes on gotchas while migrating 35kb preprompts from Opus to self-hosted Ollama](https://news.ycombinator.com/item?id=49697014) · Hacker News

## commit-rewriter 0.1 enables safe commit message editing

![commit-rewriter 0.1](https://pahupabfrvbxqtkhogar.supabase.co/storage/v1/object/public/blog-images/2026-09-14/2e88014063fe25dc.jpg)

Simon Willison released commit-rewriter 0.1, a Python web app that rewrites Git commit messages while preserving repository integrity. The tool creates a timestamped backup branch before rewriting commits from the first edited one to the latest, allowing safe reversion. It was developed to clean up private issue references and agent-generated text from security release commits before public publication. The application requires no external dependencies beyond Python and Git, and operates locally without network access.

**Source:** [commit-rewriter 0.1](https://simonwillison.net/2026/Sep/14/commit-rewriter/) · Simon Willison

## shot-scraper 1.12 adds WebP screenshot support

![shot-scraper 1.12](https://pahupabfrvbxqtkhogar.supabase.co/storage/v1/object/public/blog-images/2026-09-14/39d9007229120c6f.jpg)

Simon Willison updated shot-scraper to support WebP output format for website screenshots, enabling smaller file sizes compared to JPEG or PNG. Users can specify quality levels via the --quality flag, with default behavior producing lossless WebP files. The feature was implemented to reduce the file size of promotional screenshots for the newly released commit-rewriter tool. WebP support is accessible through the same CLI interface, requiring only a change in output file extension and optional quality parameter.

**Source:** [shot-scraper 1.12](https://simonwillison.net/2026/Sep/13/shot-scraper/) · Simon Willison

## What to watch next

These developments highlight divergent trajectories in AI and software tooling: one advancing safety-critical generative systems through algorithmic innovation, another addressing infrastructure sustainability via material science, and a third refining developer workflows through lightweight, local tools. Each operates within defined boundaries—HardFlow on final outputs, Atlas on waterless recycling, and Willison’s tools on local Git and screenshot workflows—without claiming universal applicability.
