Back to blog

9 min read

DAY 1 Development Update

Day one of the AI Hook Builder in production: a real cloud agent, on chain guardrails, durable sessions, and a file panel that survives a dropped connection.

Day 1: from preview to a real cloud agent

The AI Hook Builder moved past scripted demo responses. Every session now runs on a genuine cloud coding agent that clones the HookPad contracts repo, writes a real Solidity hook, and runs the actual Foundry test suite before it ever tells you something passed.

That matters because a hook that only looks right in a chat bubble is not the same thing as a hook that compiles and passes tests. The builder now works the way a careful engineer would: read the base contract and a reference example first, write the implementation, then run forge build and forge test in a loop until the suite is genuinely green.

This is live today on both Ethereum and Robinhood Chain, with the same rules enforced on both.

Guardrails that live on chain, not in a prompt

Custom hooks are powerful, so the limits on them are not just instructions to the AI. Total tax on any single swap is capped at 10% by the base contract every custom hook must inherit from, and 20% of that tax is always routed to the protocol treasury through one shared settlement path.

The AI cannot design around these limits, because they are not the AI's decision to make. They are enforced in HookPadCustomHookBase itself, and every generated hook is checked against a fixed set of invariant tests: no honeypot behavior, no arbitrary draining of pool funds, no unbounded minting. If a design would break any of that, the tests fail and the hook does not ship.

Independent verification runs again on the server after the agent claims success. HookPad never takes the agent's word for 'tests passed' at face value.

Classic hook or AI generated, one launch flow

Custom hooks now plug directly into the same launch path as the default HookPad hook. When a design passes its tests and its CREATE2 address is independently confirmed, you get a choice at launch time: use the shared classic hook, or launch with the custom hook you just built.

There is no separate, lesser deploy path for AI generated hooks. Both options route through the real launch factory, with the same anti snipe protection and fee mechanics traders already expect from a HookPad launch.

Sessions that survive a refresh

Long running agent turns used to be fragile. A dropped connection or a page refresh mid build could leave a session looking abandoned even if the agent kept working in the background.

Sessions are durable now. Chat history, generated files, and agent status are saved continuously, and if you refresh or come back later, HookPad reconnects to the running cloud agent and catches the UI up to whatever actually happened, instead of showing a stale or empty state.

Fixing files that never showed up

One rough edge this cycle: occasionally the agent would finish a hook, confirm tests passed, and then simply not repeat the file contents in a format the interface could read on a later turn. The result was a working hook with an empty file panel, which looked like a failure when the build had actually succeeded.

The system prompt now makes it explicit that the agent must re-emit the finished hook's source and test files every time it confirms completion, and the backend adds a second layer: if a turn ends without that output, HookPad automatically follows up and asks the agent to re-send it before giving up. Sessions affected by this should now recover on their own.

A workspace built for longer sessions

As sessions got more capable, the workspace needed to keep up. The builder is fully responsive now, with a dedicated history view for switching between saved sessions on any screen size, and a file panel that shows exactly what the agent has written as it works rather than a static example tree.

History and files are wallet and chain scoped, so switching between Ethereum and Robinhood Chain, or between wallets, always shows the sessions that actually belong there.

What is next

The template library is still the next big step: once a wide enough set of audited custom hooks exist, the plan is to surface the strongest ones as selectable presets at launch time, not just as one off generations.

In the meantime, the builder keeps getting more reliable under real usage. If a session ever behaves unexpectedly, keep it open and give it a beat. Most of the failure modes that used to require starting over now resolve themselves.