<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chainwhizz</title>
	<atom:link href="https://chainwhizz.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://chainwhizz.com</link>
	<description>Field notes on running autonomous agents</description>
	<lastBuildDate>Wed, 11 Nov 2026 11:46:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://chainwhizz.com/wp-content/uploads/2023/04/chainwhizz-logo-new-150x150.png</url>
	<title>Chainwhizz</title>
	<link>https://chainwhizz.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>One agent, seven websites</title>
		<link>https://chainwhizz.com/notes/one-agent-seven-websites/</link>
		
		<dc:creator><![CDATA[Moritz Braun]]></dc:creator>
		<pubDate>Wed, 11 Nov 2026 11:46:38 +0000</pubDate>
				<category><![CDATA[Agent operations]]></category>
		<guid isPermaLink="false">https://chainwhizz.com/?p=545</guid>

					<description><![CDATA[An agent maintains my WordPress sites on its own. It never sees a hosting password, and every change is saved, tested on the live page and rolled back if the test fails. How the path is built and what stays blocked.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I run seven WordPress sites on three hosting providers: two shops, two blogs, two affiliate sites and this one. Since November 2026 an agent maintains them. It updates plugins, improves titles and descriptions, refreshes old articles and watches whether the sites are up. This note describes how it is allowed to do that.</p>



<h2 class="wp-block-heading">Two parts: an agent and a gateway</h2>



<p class="wp-block-paragraph">The agent has no hosting passwords. They sit in a second container, the gateway, which offers the agent a set of tools and nothing else. The agent can ask the gateway to read a page, list plugins or plan a change. What comes back is checked for anything that looks like a secret and redacted. Every call lands in an audit log.</p>



<p class="wp-block-paragraph">One of the three hosts offers no shell at all, only file transfer. For that host the gateway uploads a small helper file for each call, addresses it once over HTTPS and deletes it again.</p>



<h2 class="wp-block-heading">Every change takes the same path</h2>



<ol class="wp-block-list">
<li><strong>Plan.</strong> The gateway saves the current state of what is about to change and produces a preview.</li>



<li><strong>Check.</strong> At execution time the saved state must still match the live state. If someone changed the page in between, the plan is void.</li>



<li><strong>Change.</strong> The change is applied and the page cache is cleared.</li>



<li><strong>Test.</strong> The gateway fetches the live page. It expects status 200, no PHP error, a check text from the change visible on the page, and a page that has not become more than 30 percent shorter. Shops are also tested on the shop and checkout pages.</li>



<li><strong>Roll back or report.</strong> If the test fails, the saved state is restored automatically. If it passes, I get a short message saying what was changed.</li>
</ol>



<p class="wp-block-paragraph">The agent cannot skip a step, because the steps are not instructions to the agent. They are what the gateway does when the agent calls the tool.</p>



<h2 class="wp-block-heading">What stays blocked</h2>



<ul class="wp-block-list">
<li>Legal pages, including imprint and privacy policy</li>



<li>Checkout, cart and account pages, orders and coupons</li>



<li>Users, newsletters and security-related settings</li>



<li>Prices, sales and ads: there are no tools for these at all</li>



<li>Scripts, iframes and forms inside page text</li>



<li>Plugins from anywhere but the official directory, and any change beyond updates to payment, security, consent and legal plugins</li>
</ul>



<p class="wp-block-paragraph">The agent may write small pieces of theme code. The gateway checks the syntax on the target server first and rejects code that calls system, file, mail or user functions. There is also a cap on the number of changes per day and a hard daily budget for paid keyword data.</p>



<h2 class="wp-block-heading">From read-only to full rights in two days</h2>



<p class="wp-block-paragraph">On the first day the agent could only read. On the second day it could write, with one condition: for changes to published pages the gateway sent me a preview and a six-digit code, and the change ran only after I passed the code on. The gateway stored only a hash of the code, and the agent never saw it anywhere else.</p>



<p class="wp-block-paragraph">That lasted a few hours. Each change was already saved and tested, so I changed the rule on the same day: act on your own, tell me afterwards, and if in doubt I have the change rolled back. Control moved from asking before to undoing after. The blocked areas above stayed blocked.</p>



<h2 class="wp-block-heading">A role change that did not arrive</h2>



<p class="wp-block-paragraph">When I gave the agent write access, a chat with it was already running. That session kept its old instructions. The agent told me it had no write access, and it took my approval codes for login codes from someone else.</p>



<p class="wp-block-paragraph">Its caution was correct given what it knew. The mistake was mine: new permissions have to reach running sessions, not only new ones. Since then, refreshing the sessions is part of every role change.</p>



<h2 class="wp-block-heading">What I do not know yet</h2>



<p class="wp-block-paragraph">At the time of writing the agent has been at work for less than a week. In my tests the pipeline held: changes went through, failed tests were rolled back and the blocked areas stayed untouched. Whether its work brings more visitors and sales is a separate question, and I will write about it when there are numbers worth showing.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The stop order that rounded to zero</title>
		<link>https://chainwhizz.com/notes/the-stop-order-that-rounded-to-zero/</link>
		
		<dc:creator><![CDATA[Moritz Braun]]></dc:creator>
		<pubDate>Wed, 11 Nov 2026 11:46:35 +0000</pubDate>
				<category><![CDATA[Trading agents]]></category>
		<guid isPermaLink="false">https://chainwhizz.com/?p=544</guid>

					<description><![CDATA[A rounding function turned a stop price into 0, my own monitor cancelled a working stop-loss, and a position sat unprotected for a night. What went wrong in plain code, and what changed.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">For one night in July 2026, a short position of mine sat on the exchange without a stop-loss. No language model was involved. The stop had been removed by my own position monitor, a piece of plain code whose only job is to make sure every position has one.</p>



<h2 class="wp-block-heading">What the monitor does</h2>



<p class="wp-block-paragraph">The monitor runs every 15 minutes. It reads the open positions and stop orders, works out where each stop should be and acts if needed: it places a missing stop or moves an existing one closer. It never moves a stop further away. Before it sends a price to the exchange, it rounds the price to the tick size of the contract.</p>



<h2 class="wp-block-heading">The bug</h2>



<p class="wp-block-paragraph">To round a price, the code needed the number of decimal places of the tick size. It got that number by turning the tick size into text and counting the digits after the decimal point. For a tick size of 0.01 the answer is 2.</p>



<p class="wp-block-paragraph">The contract in question trades at a very low price and has a tick size of 0.000000001. JavaScript writes that number in scientific notation:</p>



<pre class="wp-block-code"><code>String(0.01)          // "0.01"   two digits after the point
String(0.000000001)   // "1e-9"   no point at all</code></pre>



<p class="wp-block-paragraph">With no decimal point in the text, the code counted zero decimal places and rounded every stop price for this contract to a whole number. A stop at 0.000004487 became a stop at 0.</p>



<h2 class="wp-block-heading">Why the safety rule did not catch it</h2>



<p class="wp-block-paragraph">The rule that a stop may only move closer compares two prices. For a short position, closer means lower. A stop at 0 is lower than any real stop, so to the rule it looked like the tightest stop possible, and the move was allowed.</p>



<h2 class="wp-block-heading">What happened</h2>



<p class="wp-block-paragraph">Moving a stop took two steps: cancel the old order, then place the new one. The cancel went through. Then the exchange rejected the new order, because a stop price of 0 is not a price. From that moment the position had no stop.</p>



<p class="wp-block-paragraph">Every 15 minutes the monitor found a position without a stop, calculated a stop at 0 and was rejected again, 32 times in a row. The position closed the next morning with a loss of about half a dollar. That was luck. If the market had moved hard against the position that night, nothing would have limited the loss.</p>



<h2 class="wp-block-heading">The fix</h2>



<ul class="wp-block-list">
<li>The number of decimal places now comes from the logarithm of the tick size and no longer from its text form. I tested the function against eight tick sizes, including the smallest one and odd ones like 0.5.</li>



<li>A calculated stop that is not greater than zero leads to no action at all. The monitor keeps the existing stop and logs the reason.</li>



<li>Prices are formatted with a fixed number of decimal places before they are sent, so very small numbers no longer leave the system in scientific notation.</li>
</ul>



<h2 class="wp-block-heading">What I took from it</h2>



<p class="wp-block-paragraph"><strong>The order of cancel and place matters.</strong> Cancelling first leaves a gap whenever the second step fails. The futures agent that later replaced this setup works the other way round: its gateway refuses to cancel the protective stop of an open position until a stop that is at least as tight is in place.</p>



<p class="wp-block-paragraph"><strong>A comparison needs plausible inputs.</strong> The rule against loosening a stop was correct and still let the worst case through, because one of the two prices it compared was nonsense. The check for a usable price has to come before the rule.</p>



<p class="wp-block-paragraph"><strong>Test the extreme inputs.</strong> The rounding function worked for the usual tick sizes. I had not tested it with the smallest one.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Why the risk limits don&#8217;t live in the prompt</title>
		<link>https://chainwhizz.com/notes/why-the-risk-limits-dont-live-in-the-prompt/</link>
		
		<dc:creator><![CDATA[Moritz Braun]]></dc:creator>
		<pubDate>Wed, 11 Nov 2026 11:46:33 +0000</pubDate>
				<category><![CDATA[Trading agents]]></category>
		<guid isPermaLink="false">https://chainwhizz.com/?p=542</guid>

					<description><![CDATA[My futures agent decides on its own what to trade. How much it can lose is enforced by a gateway it cannot change. What the gateway checks, and why it refuses orders instead of repairing them.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">My futures agent runs without approvals. It reads the market, decides, and sends orders. The obvious place for its risk rules would be the prompt: never risk more than a fixed share of the account, never exceed a certain leverage, always set a stop.</p>



<p class="wp-block-paragraph">A prompt is text the model weighs against everything else it reads. Rules written there hold most of the time, and for money that is not enough. So the limits sit in a gateway between the agent and the exchange, in code the agent cannot change.</p>



<h2 class="wp-block-heading">Where the limits sit</h2>



<p class="wp-block-paragraph">The agent has no exchange key. It talks to the gateway with a key of its own, and that key belongs to a role with a narrow set of tools: read market and account data, open a position, reduce or close one, cancel its own orders. Every other tool is refused.</p>



<p class="wp-block-paragraph">The limits themselves are configuration on the gateway. The agent can ask how much risk budget is left, but it has no way to raise it.</p>



<h2 class="wp-block-heading">What happens to an entry</h2>



<p class="wp-block-paragraph">Every order that opens exposure goes through the same checks:</p>



<ul class="wp-block-list">
<li>Is trading switched on? The switch is mine. If it is off, nothing opens.</li>



<li>Is the account above its floor, and are the loss limits for the day and for the last seven days intact?</li>



<li>Has the agent already used its entries for today?</li>



<li>Is the symbol in the allowed set, which contains only the most liquid contracts?</li>



<li>Does the order carry a stop-loss on the correct side of the entry, and is the stop distance inside the permitted band?</li>



<li>Is the leverage within the cap and the margin isolated?</li>



<li>Would this trade push the sum of all possible stop-losses above the budget for the whole account?</li>
</ul>



<p class="wp-block-paragraph">The agent does not choose a position size. It states which share of the account it is willing to lose if the stop is hit, and the gateway calculates the size from the entry price and the stop distance. If that budget is smaller than one lot of the contract, the order is refused.</p>



<h2 class="wp-block-heading">Refuse, don&#8217;t repair</h2>



<p class="wp-block-paragraph">When a check fails, the gateway refuses the order and gives the reason in one sentence, for example that the stop distance is outside the band. It does not move the stop or lower the leverage on the agent&#8217;s behalf. The agent reads the reason and decides again.</p>



<p class="wp-block-paragraph">I chose this because a gateway that quietly repairs orders produces positions nobody asked for in that form. With refusals, every position on the exchange goes back to one explicit request.</p>



<h2 class="wp-block-heading">Fail closed</h2>



<p class="wp-block-paragraph">If the gateway cannot read positions, open orders or the current price, it refuses new entries. An account it cannot see is treated like an account with no risk budget left.</p>



<h2 class="wp-block-heading">Stops are protected too</h2>



<p class="wp-block-paragraph">The agent may cancel its own orders, with one exception: it cannot remove the protective stop of an open position. It first has to place a stop that is at least as tight, and only then can the old one go. Cancelling all orders at once is not available to it, because that would drop the stops as well.</p>



<h2 class="wp-block-heading">What this does not solve</h2>



<p class="wp-block-paragraph">The gateway limits how much the agent can lose. It says nothing about whether the trades are any good. That is a separate problem with tools of its own, a paper book and a research bench, and a topic for other notes.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
