logoalt Hacker News

DeathArrowtoday at 5:43 AM1 replyview on HN

First thought: But why do we need statewright.ai external api? Why can't we do everything locally?

Second thought: enforcing tools is useful and I built myself a Pi extension to deny access to particular tools in some workflows.

But we need somehow to force agents obey the rules.

For example I have rules when using Pi to ask main agent to dispatch implementer agents in parallel using git worktrees. Some time it uses git worktrees, sometimes not.

The thoughts are like this: "the user asked me to use git worktrees so let me start using git worktrees. But wait, the task is simple so maybe I don't need git worktrees..."

If I ask why it didn't follow the rules, it says something like: "The user is right, I should have followed the rules..."


Replies

esperenttoday at 7:29 AM

> example I have rules when using Pi to ask main agent to dispatch implementer agents in parallel using git worktrees. Some time it uses git worktrees, sometimes no

I've taken the approach that whenever this happens, it's my fault. The instructions were not clear enough, not direct enough, or more often, there's just too many of them.

I'm now at the point where my pi system prompt + agents + skills + tools starts out at just 7k context. It's all very clear and concise. I almost never have ambiguous responses like this, at least not bear the start of a session.

Combined with instructions to keep the main session as a coordinator and use subagents for all non trivial work, I can get a lot of work done before hitting 100k context and basically never go over 150k.

It's a stark contrast with Claude code where I was starting at about 35k context even after trimming my stuff down. It's hardly surprising if an agent doesn't know what to do if you dump 30k+ of context with all kinds of rules and workflows, most of them unrelated to the current tasks, before you even do anything.

show 1 reply