absorb.md

Simon Willison

Chronological feed of everything captured from Simon Willison.

XSS Vulnerability and Mitigation in Claude Code Timeline Viewer

A Cross-Site Scripting (XSS) vulnerability was identified in the Claude Code Timeline Viewer's markdown rendering function. The original implementation failed to properly sanitize user-supplied URLs and attribute values within markdown links, allowing for JavaScript injection. The vulnerability was mitigated by integrating the DOMPurify library, which now sanitizes the HTML output of the markdown renderer, effectively preventing malicious script execution and attribute manipulation while preserving intended markdown functionality, including newly added table support.

Claude Code Timeline Viewer Enhanced with User Prompts Extraction Button

Simon Willison iteratively enhanced claude-code-timeline.html, a client-side viewer for Claude Code .jsonl session logs, by adding a "Copy prompts" button above the timeline/detail panels. The button filters events by type='user', role='user', and content-type='text', extracts text content from matching messages, concatenates with double newlines, and copies to clipboard using existing copyText utility. A 2-second "Copied!" state feedback was added via setTimeout for improved UX. Implementation used precise Edit tool calls on HTML structure, els object, and script logic without disrupting core timeline/filtering functionality.

Python Script Modified for Consistent Claude Project Path

A Python script, `claude_code_to_gist.py`, was modified to ensure consistent project folder referencing. Previously, it used a relative path, but now it explicitly points to `~/.claude/projects`, enhancing predictability and portability for locating `.jsonl` session files for Gist publication.

Enhanced Claude Code Timeline Viewer with Prompt Modals

The Claude Code Timeline Viewer is being upgraded to include a 'Show prompts' button that reveals a modal dialog containing user prompts. This enhancement, inspired by the Codex timeline functionality, improves prompt visibility and user experience by decoupling prompt viewing from immediate clipboard operations. The update involves adding new HTML elements, CSS styling, and JavaScript functions to manage the modal's state and interactions, ensuring a more intuitive way to access and copy user inputs.

LLM CLI Logs Enhancement: Adding Formatted Options to Markdown Output

The `llm logs` command-line interface has been enhanced to include a dedicated "## Options" section in its Markdown output for individual log entries. This new section, formatted as a YAML-like list, displays model-specific options when they are present in the `options_json` field of the log record. This improvement provides clearer visibility into the parameters used for each model interaction directly within the human-readable log view, streamlining analysis for technical users.

Refining Media Resolution Handling in llm-gemini Plugin

The conversation focuses on optimizing how the `llm-gemini` plugin handles media resolution for Gemini models, particularly to accurately reflect user intent in logging and efficiently interact with the API. The key change involves modifying the default `media_resolution` option to `None` and refining the request-building logic to only explicitly set a resolution when specified by the user or when a YouTube URL necessitates a low-resolution default for processing.

TDD-Driven Development of a Minimal Uvicorn Hello World Application

A minimal Uvicorn-based "Hello, World!" ASGI application was developed and thoroughly tested using a Test-Driven Development (TDD) approach. The project adheres to a strict dependency constraint, only utilizing Uvicorn for application runtime, with pytest and pytest-asyncio serving as development dependencies for robust testing. Comprehensive project documentation including a specification, README, and pyproject.toml was generated.

FastAPI/Uvicorn Proxy Server Adds Custom Headers for Performance Monitoring

A FastAPI and Uvicorn-based HTTP proxy server has been developed and tested. This proxy transparently forwards all HTTP methods and preserves path, query strings, and request bodies to `simonwillison.net`. It enhances responses with `x-proxied-by: uvicorn` and `x-response-time-microseconds` headers, effectively demonstrating how to inject custom metadata and performance metrics into proxied traffic.

Claude Code Timeline Viewer Enhanced to Filter Summary and Meta Prompts

The Claude Code Timeline Viewer, a web-based tool for visualizing Claude Code sessions, has been updated. The `extractUserPrompts` function in the `claude-code-timeline.html` file was modified to filter out user prompts marked as `isCompactSummary: true` or `isMeta: true`. This enhancement prevents auto-generated context summaries and meta-messages from appearing in the user prompt timeline, improving the clarity of user interaction analysis.

CSS Grid Lanes Polyfill: Implementation and Challenges of Masonry Layout Emulation

The provided content explores a polyfill for the experimental CSS Grid Lanes feature, aimed at enabling masonry-style layouts across browsers. The core challenge lies in accurately parsing and applying CSS properties like `display: grid-lanes`, `grid-template-columns`, `gap`, and `item-tolerance` in environments lacking native support. The polyfill must overcome browser-specific interpretations of invalid CSS to correctly emulate the layout algorithm, which places items in the shortest available "lane" to optimize visual flow.

Simon Willison Denies X Access

Simon Willison has not been granted access to the X platform, contrary to potential speculation. This insight clarifies the current status of his platform access.

Streaming Experts in Mixture-of-Experts Models

The potential for "streaming experts" within a Mixture-of-Experts (MoE) model suggests a capability to dynamically allocate computational resources. This approach could enable more efficient processing by engaging specialized expert models only when relevant to the input stream. It implies an architectural evolution towards adaptive and on-demand expert utilization in large language models.

Memory Requirements for LLM Inference

Running large language models (LLMs) for inference, especially those with high parameter counts, typically necessitates significant GPU memory. While some quantized models can operate on consumer-grade hardware like a 256GB or 512GB Mac Studio, larger, unquantized models predominantly require high-end NVIDIA GPU servers to ensure sufficient memory and computational throughput.

Image Generation Models Ingest Social Media Conversations For Training Data

Image generation models are incorporating social media comments and descriptive text as training data, as evidenced by precise textual details appearing in generated images that mirror comments from posts. This suggests that the models are not only processing visual information but also integrating contextual textual descriptions from online interactions, even for unusual prompts. This expansive approach to data ingestion implies a broader definition of

Anthropic’s Project Glasswing: A Model Access Strategy for Security Research

Anthropic has made its advanced Opus-beating model exclusively available to partnered security research organizations under "Project Glasswing." This selective distribution strategy is likely a response to recent concerns from credible security experts, aiming to control access to powerful AI models for responsible research and development.

Pelican GLM-5.1 Drawing and Animation by Simon Willison

Simon Willison highlighted the capabilities of the Pelican GLM-5.1 model, specifically its ability to generate and animate drawings. This observation suggests advancements in generative AI for visual content. The integration of this specific model into his workflow or its demonstrated output indicates a practical application for AI in creative digital tasks.

GLM-5.1 Sets New AI Performance Benchmarks with Extended Autonomy

GLM-5.1, an open-source model, achieves top-tier performance on coding and long-horizon tasks, ranking #1 in open source and #3 globally across prominent benchmarks. Its key innovation lies in its ability to operate autonomously for 8 hours, executing thousands of iterations to refine strategies. This enhanced capability is indicative of advancements in AI for complex problem-solving and extended operational cycles, making it suitable for applications that require sustained, independent operation.

Early Impressions of Gemma 2 vs. Qwen 1.5 Comparison

A recent social media poll by Simon Willison solicited community feedback on Gemma 2 performance against Qwen 1.5, few days after Gemma 2 release. The poll aims to gather early impressions and comparative analysis of the two models from developers and users who have experimented with it. The results are not yet available, but the prompt suggests an active evaluation phase within the AI community.

GLM-5.1 Demonstrates Advanced Code Generation and Debugging Capabilities

Z.ai's GLM-5.1, a large language model, exhibits an unexpected ability to generate complex HTML with integrated SVG and CSS animations. Furthermore, it can self-debug and correct issues in its generated code based on user feedback, showcasing advanced reasoning and code manipulation capabilities beyond simple SVG generation. The model contextualizes and regionalizes prompts, hinting at advanced implicit prompt understanding.

Anthropic’s Claude Mythos: A Dual-Use AI with Unprecedented Cybersecurity Capabilities Released Under Restricted Access

Anthropic has launched Project Glasswing, providing restricted access to Claude Mythos Preview, a general-purpose AI model demonstrating unprecedented cybersecurity capabilities far exceeding previous models. This restricted release strategy is due to the model’s ability to autonomously discover and exploit high-severity vulnerabilities across major operating systems and web browsers. The initiative aims to provide the software industry with time to address critical vulnerabilities before wider deployment of such powerful AI.

SQLite WAL Mode Across Docker Containers on a Single Host

SQLite's Write-Ahead Logging (WAL) mode functions efficiently across Docker containers sharing a volume on the same host. This is due to shared kernel and filesystem semantics facilitating real-time propagation of database changes and effective memory-mapped file sharing. This setup was validated using Docker Desktop for macOS, dispelling concerns about WAL shared memory conflicts.

Scan-for-Secrets: Proactive Identification and Redaction of Sensitive Data in Codebases

scan-for-secrets is a Python tool designed to identify and optionally redact sensitive strings across various file types, including common escaped variants. It supports scanning directories or specific files, reading secrets from arguments, piped input, or a configurable file. Its core utility lies in preventing inadvertent exposure of credentials or other private data before sharing code or logs.

datasette-ports 0.2 Enables Discovery of Running Datasette Instances and Their Ports

datasette-ports 0.2 is a new release that discovers all currently running Datasette instances on a system and lists their exposed ports. This tool facilitates management and interaction with multiple Datasette servers. It provides actionable output for technical workflows involving Datasette deployments.

Datasette-Ports: Streamlining Local Datasette Instance Management

The Datasette-Ports tool addresses the common issue of managing multiple, locally running Datasette instances. By providing a command-line utility to list all active instances and their associated ports, databases, and plugins, it significantly improves developer workflow. This tool is especially valuable for developers working with various databases and in-development plugins across numerous terminal windows, as it centralizes instance discovery and overview.

Datasette Ports Tool Now Independent

The `datasette-ports` tool, which identifies running Datasette instances and their active ports, has been made standalone. It no longer requires a direct Datasette installation to function, enhancing its usability for developers. The tool can be executed via `uvx datasette-ports`, though its plugin functionality within Datasette for the `datasette ports` command remains.

scan-for-secrets 0.3 Released for Pre-Sharing Secret Detection in Files

Simon Willison released version 0.3 of scan-for-secrets, a tool designed to detect secrets in files before they are shared publicly. It scans for common credentials and tokens to prevent accidental leaks. The update enhances usability for developers handling sensitive code.

Claude Code Paste Tool Cleans Terminal Output by Removing Prompts and Fixing Whitespace

Simon Willison's cleanup-claude-code-paste tool processes terminal output pasted into Claude, stripping ❯ prompts, correcting wrapped-line whitespace, and joining fragmented lines into clean, readable text. It targets common formatting issues from terminal copy-pastes to improve code or output usability in AI interfaces. The tool outputs "Cleaned output:" followed by the processed text.

datasette-ports 0.1 Released to Detect and List Ports of Running Datasette Instances

Simon Willison released datasette-ports 0.1, a tool that identifies all currently running Datasette instances on a system and outputs their ports. This enables quick discovery of active Datasette servers without manual port scanning or configuration checks. Targeted at Datasette users managing multiple local instances.

New Redaction Features in Simon Willison Tool

Simon Willison has released an update to his internal tools, introducing new redaction capabilities. The update includes a new command-line option for interactive redaction and a Python function for programmatic redaction. These features enhance the utility for handling sensitive information within files.

Claude Code Terminal Output Cleaning Tool

Simon Willison developed a specialized web tool to address the common issue of extraneous whitespace and prompt characters (❯) when copying code snippets from the Claude Code terminal application. This tool streamlines the process of obtaining clean, usable code by automatically removing these artifacts and reformatting wrapped lines. It is designed for developers who frequently interact with Claude Code and require efficient code transfer.

Google's AI Edge Gallery: On-device Gemma Models with Tool Calling on iOS

Google has released an official iOS app, "Google AI Edge Gallery," enabling on-device execution of Gemma 4 and Gemma 3 models. The app showcases local model capabilities for tasks like image Q&A and audio transcription, and features a "skills" demo for tool calling against HTML-based widgets. This marks a significant step for vendor-supported on-device AI.

Simon Willison Opposes Bans on Claude's Parallel Prompt Execution Flag

Simon Willison explicitly rejects policies prohibiting the use of "claude -p", Anthropic's Claude tool flag for parallel prompt execution. This stance implies endorsement of advanced CLI features for efficient AI model interaction. Technical users should note its utility in high-throughput prompting workflows.

Anthropic's Claude Filters System Prompts for "OpenClaw" String, Blocks or Surcharges Usage

Anthropic's Claude model detects specific text like "A personal assistant running inside OpenClaw" in system prompts and either blocks access or applies extra billing charges. This filtering was empirically confirmed via testing, as demonstrated in a screenshot shared by Florian Kluge. The practice raises concerns over discriminatory billing based on prompt content, highlighted in discussions around first-party harness usage.

Older entries β†’