Repository navigation
dsh-governor: catching runaway agents, retry storms, and reasoning-budget burn #4259
Replies: 2 comments
|
Hi @leenkcool, thanks for the kind words and for the invitation, and sorry for the very slow reply. Your comment sat unanswered a lot longer than it deserved. Yes, please do include it. The "don't reinvent the wheel" goal behind the list makes sense to me, and I would rather help that along than have people rediscover the same plugin. Happy to open the PR myself if that saves you time. Here is the entry in your {
"repo": "JoaquinDG/dsh-governor",
"name": "dsh-governor",
"category": "orchestration",
"language": "TypeScript",
"license": "MIT",
"stars": 0,
"compat": "unknown",
"desc_en": "Behavioural supervision for agents: detects retry storms and reasoning-only turns that bill output tokens but emit no text, then applies a notice/pause/stop ladder. Its backstop uses both monotonic and wall-clock time, so it still fires after the host suspends.",
"desc_zh": "面向 agent 的行为监督:检测重试风暴,以及只有思维链、不产生正文但仍计费输出 token 的回合,并按 notice/pause/stop 阶梯介入。兜底计时同时使用单调时钟与墙上时钟,因此主机休眠后仍然有效。",
"sourceNote": "",
"featured": false,
"_lists": ["plugin"]
}Three things I would rather flag now than have you discover later:
Let me know whether you would prefer the PR from me or would rather just add the entry yourself, and I will follow whichever is easier. 你好 @leenkcool,感谢邀请,也很抱歉回复这么晚。 欢迎收录 dsh-governor。上面是按你 我可以直接提 PR,你自己添加也完全没问题,听你安排。 Disclosure: I use Claude Code as part of my workflow, including for drafting this comment and the Chinese above. The plugin's behaviour and the caveats are my own, and the |
Uh oh!
There was an error while loading. Please reload this page.
Hi all. I have been porting some agent-supervision work over to the harness and it turned
out to fit unusually well, so sharing it in case it is useful to anyone.
It watches a running agent for three failure shapes. Observation is the default and changes
nothing; enforcement is opt-in.
Retry storms, by ratio rather than consecutive runs. Counting "three identical failures
in a window" misreads a flaky provider as a stuck agent. Four scattered
503s across twelveproductive steps is a vendor having a bad afternoon, and pausing there costs someone a
working session. Requiring strict consecutiveness fails the other way, since a storm that
thinks between attempts is still a storm. This requires the repeated signature to occupy
half the window.
Output tokens billed with no visible text. Reasoning models spend the budget on hidden
thinking first, and when the cap runs out before any answer you get a truncation reason and
an empty body. Measured across five providers, two returned zero characters while billing
the full budget. This is invisible to text-based supervision because there is no text to
read.
llm/streammade this nicer to implement than it was in the original: separatingtext-deltafromreasoning-deltameans the warning can say why the answer is empty, notjust that it is.
A backstop that survives host suspend.
performance.now()stops advancing while amachine sleeps, so a watchdog on it alone silently never fires. This takes
max(monotonic, wall).The
PreToolDecisionaskvariant was a pleasant surprise. Most supervisors have to choosebetween letting a suspect run continue and killing it, and
askgives a middle rung forfree.
Repo: https://github.com/JoaquinDG/dsh-governor · MIT · 24 tests, several driving a real
Cordis context.
Honest caveat: the preset thresholds are starting points, not measurements. The detectors
are ported from work tuned against replayed sessions, but the dsh presets have not been
tuned against real harness traffic yet. Feedback from anyone running it welcome.
Disclosure: built with Claude Code.
All reactions