desk-incident-response
Skill530 starsChanged 4 days agoMITView on GitHub
What the desk does when something goes wrong on Hyperliquid - unknown send results, unexpected fills or positions, unprotected positions, stuck or orphaned orders, API outages, rate limiting, and suspected API wallet compromise. Contain first, reconcile from the exchange record, act only through approved tickets, then review. Use the moment anything does not match the ticket.
2 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- swcstudiospace/PumpGroktheir own version, first seen Nov 5, 2026
- Mendurim/strikegrok-trading-deskedited, first seen Sep 10, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- Mendurim/strikegrok-trading-desk★ 015% same
Wrote their own version · 1
- swcstudiospace/PumpGrok★ 66same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- desk-execution-protocolSkill
- desk-monitoringSkill
- desk-operating-modelSkill
- desk-post-trade-reviewSkill
- desk-risk-limitsSkill
- desk-strategy-labSkill
- desk-trade-lifecycleSkill
- hypergrok-bootstrapSkill
- hyperliquid-accountSkill
- hyperliquid-advancedSkill
- hyperliquid-api-referenceSkill
- hyperliquid-market-dataSkill
- hyperliquid-ordersSkill
- hyperliquid-positionsSkill
- hyperliquid-setupSkill
- hyperliquid-websocketSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Not found: that is not proof.
- Very specific: line 44
Read clearinghouseState and userFills for the last hour.
- Distinctive: line 46
If exposure breaches limits: an emergency reduce ticket (reduce-only IOC at a slippage bound for the excess size) is written by the Risk …
- Very specific: line 74
Read the full historicalOrders and userFills since the last known-good time.
- Very specific: line 82
Not an incident, but handled like one: Risk Manager posts it, desk.md gets status: no-new-risk, protective and exit tickets continue, new …
- Very specific: line 87
Every containment action is still a ticket with approval by id (or a pre-written standing approval in desk.md).
- Distinctive: line 88
Never withdraw, transfer or bridge as an incident response.
- Distinctive: line 89
Never resend to "make sure".
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Incident response
An incident is any moment when the exchange record and the desk's expectation disagree, or when the desk cannot see the exchange at all. The reflex is: stop adding, look, contain with approval, then review. Never widen the harm by improvising.
Declare
Any Bot can declare an incident. Post on the floor:
INCIDENT INC-20260817-01 | 11:40 UTC | HG-20260817-02 | send timeout, result unknown | owner: Execution TraderThe Desk Lead confirms an owner (usually the Execution Trader for order/position incidents, the Risk Manager for exposure incidents, the Desk Lead for access incidents). New proposals pause until the incident is contained.
Playbooks
A. Unknown send result (timeout, 5xx, exception after send)
- Do not resend.
orderStatusby cloid;openOrders;userFillssince the send;clearinghouseState.- Found: continue reconciliation as normal; journal that the response was lost.
- Not found: that is not proof. Wait until the signed
expiresAfterdeadline has passed, then reconcile again. Expiry prevents later acceptance; it does not cancel an order accepted before the deadline or remove its fills. - Without expiry, follow
desk-execution-protocol: anoopneeds an exact recovery ticket, Risk PASS, approval by id and native-gate coverage, and must use the original exact signed nonce, the same API wallet signer and network. Only the Execution Trader sends it, once. Confirm noop acceptance and reconcile the original; a newer nonce cannot invalidate it, and a nonce-reuse rejection does not prove what happened. Missing original nonce or an unconfirmed noop leaves the send reserved and new risk paused; escalate to the Desk Lead and user. - A replacement waits until later acceptance is impossible and existing exposure is reconciled, then needs a fresh ticket, Risk PASS and approval by id. If the exchange later shows the original order after a second one was sent: the desk has double exposure. Go to playbook C.
B. Rejected order or partial fill
- Rejection string in the response (
error): quote it, map it viahyperliquid-api-reference(price precision, minimum notional, insufficient margin, reduce-only would increase position, invalid tif...). Fix is a new ticket, not a tweak-and-resend. - Partial fill on an IOC: the unfilled remainder is gone and the position is smaller than the ticket. Any
normalTpslchildren were never placed (children appear only when the parent fills fully, or is partially filled and then margin-cancelled), so the filled part is unprotected: report the actual size and get a stop for that size placed at priority (playbook D). - Partial fill on a resting order: normal; reconciliation continues.
C. Position does not match expectation (too big, wrong side, unexpected market)
- Read
clearinghouseStateanduserFillsfor the last hour; establish the exact state. - Risk Manager computes exposure and liquidation distance now.
- If exposure breaches limits: an emergency reduce ticket (reduce-only IOC at a slippage bound for the excess size) is written by the Risk Manager, approved by the user by id, sent by the Execution Trader. Priority handling, same protocol.
- Journal what happened and why the mismatch occurred once known.
D. Unprotected position (no resting stop)
- Risk Manager flags it; the Desk Lead treats it as priority.
- Protective stop ticket (trigger, reduce-only, correct side, sized to the position read live) through Risk PASS and user approval. This is also the path after any partial fill of an entry that carried
normalTpslchildren. - If the user has pre-authorised protective stops in
desk.md, the Execution Trader places it under that standing approval and journals it. This is the one standing approval the desk actively recommends the user grant at setup, on every network, because it can only ever reduce risk. - Without that pre-authorisation the desk cannot act, and an unprotected position does not become safe while it waits. Do not alert indefinitely: state the exposure and the distance to liquidation in the first alert, escalate on a deadline the user set in
desk.md(fifteen minutes is a reasonable default), and when that passes, tell the user plainly that the fastest fix is theirs - close or protect the position in the Hyperliquid app - rather than continuing to ping a channel nobody is reading.
E. Orphaned or stuck orders
- Orphaned (position flat, stop still resting): cancel ticket, or the standing approval for orphan clean-up if written in
desk.md. Confirm fromopenOrders. - Stuck (order the exchange shows that the desk cannot cancel): read
orderStatus; check whether it is a trigger child of a grouped order; trycancelByCloidifcancelby oid fails; if still stuck, report with the exact response and stop.
F. Exchange unreachable, rate limited, or degraded
/infofailing or slow: mark the desk blind; no new tickets; watches log the outage; checkhttps://api.hyperliquid.xyz/infowith a tinyallMidscall every minute; report when back.- HTTP 429: back off (respect the response), reduce polling, prefer WebSocket for continuous data. Read
userRateLimitfor the account's remaining budget. - Blind with open positions: the user is told plainly that stops resting on the exchange still work while the desk cannot see; that is why stops are mandatory.
- Connectivity returning is only the start of recovery. Follow
hyperliquid-websocket's gap/restart procedure: restore account and detailed order snapshots, recover overlapping fills, reconcile reservations and protection, then let Risk recheck capacity before new risk resumes. A successful public price read or a restarted process cannot lift the account pause. Protection and exits still use verified live state and the normal approval gates.
G. Suspected API wallet compromise or misuse
Signs: orders or fills the desk did not send, leverage changes nobody approved, unfamiliar cloids.
- The user revokes the API wallet immediately in the Hyperliquid app (the API page,
/API) - the desk cannot do this for them and must not delay them. - Once revoked, the desk's key is dead; the Execution Trader confirms sends fail.
- Read the full
historicalOrdersanduserFillssince the last known-good time; Risk Manager assesses exposure; emergency reduce or protection tickets as needed after the user creates a fresh API wallet and re-provisions it through the secure secret store. - Rotate: new key through the secure secret card only; nothing pasted in chat; journal the rotation time.
- Incident review with a timeline.
Remember the shared computer: every Bot could read the key's environment; that is why only an API wallet key (trade-only, cannot withdraw) is ever provisioned, and why testnet comes first.
H. Daily loss stop hit
Not an incident, but handled like one: Risk Manager posts it, desk.md gets status: no-new-risk, protective and exit tickets continue, new risk waits for the user's written reset.
Containment rules
- Contain with the smallest reversible action. Reduce, don't flip. Cancel one, not all, unless the user has asked for a dead-man's switch and its condition has occurred.
- Every containment action is still a ticket with approval by id (or a pre-written standing approval in
desk.md). - Never withdraw, transfer or bridge as an incident response.
- Never resend to "make sure".
Close the incident
The Trade Reviewer writes the incident review (desk-post-trade-review), the Desk Lead lifts the proposal pause and records the corrective action and its owner in desk.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

