Hi, I’m Yusuke Ikoma 🕊️

I write about computer science, AI/ML, software engineering, and more.

Leaving tool results out of conversation history reads over a relay, and fetching one item when a row is opened

Opening a long conversation on the phone became extremely slow. The latest 500 history items were 19MB, nearly all tool results and arguments. Responses kept failing the relay’s 8MB limit, and the client retried with half as many items each time. After comparing a higher limit, compression and truncation, the history list now leaves tool results out, and the phone fetches the one item a user opens.

October 30, 2026 | 4 min

Binding a sudoers-allowed root helper to SUDO_UID so it cannot register a macOS LaunchDaemon as root

To run a background process on a Mac from boot, you register a LaunchDaemon as root. I split just that step into a root helper, so admins could allow only that helper in sudoers. But the helper wrote the run-as user from its arguments straight into the plist. Pass root, and any binary would run as root at every boot. This post shows how the helper now checks its input against SUDO_UID and the account database.

October 30, 2026 | 4 min

Avoiding a PostgreSQL DROP TABLE deadlock by taking LOCK TABLE NOWAIT in a Flyway beforeEachMigrate callback

A migration that only dropped an old table deadlocked in production twice and rolled back. DROP TABLE also takes the strongest lock on the tables its foreign keys reference, and a running worker read those tables in the opposite order. After comparing lock_timeout and plain reruns, I left the applied migration untouched and took all the needed locks up front with NOWAIT in a Flyway beforeEachMigrate callback.

October 30, 2026 | 4 min

Reducing React Query polling and streaming re-renders in a Tauri WebView

My Tauri desktop app used CPU every few seconds while idle. React Query’s focusManager only listens to visibilitychange, so polling kept running in a window hidden behind others. This post covers stopping it with Tauri’s focus events, a spread of the whole query result that doubled re-renders, and freezing a streaming Markdown answer block by block once each block is complete.

October 23, 2026 | 4 min

A Design for Running Agents Safely in Short-Lived Containers

I am moving the environment that runs agents from per-workspace VMs to Cloudflare Containers that start per job and stop afterwards. Following one job from start to stop, this post covers fencing off old containers (boot_id and CAS), work ownership, committing saves to R2, and draining before stopping, each compared with the common approach.

October 18, 2026 | 12 min

Monte Carlo for a Cone Rotated Twice

A Monte Carlo estimate of the volume of a cone rotated a second time. A million points are placed in a box, in a cylinder, and on a uniform grid, and each estimate is compared with the exact value.

October 16, 2026 | 8 min

WebRTC

Understanding WebRTC by comparing it with WebSocket. This article covers signaling, connection establishment with ICE, STUN, and TURN, and data transport through DataChannel and Media.

October 13, 2026 | 3 min
A pencil portrait of Michel Foucault, resting his chin on his right hand and looking toward the viewer

Poststructuralism: Michel Foucault

Revisiting Masaya Chiba’s Introduction to Contemporary Thought and exploring Michel Foucault’s philosophy. Where does power come from, and how are our notions of normality constructed?

October 10, 2026 | 3 min