strands-harness-sentinel
Skill29 starsChanged 7 months agoMITView on GitHub
Autonomous maintenance, self-healing, rate-limit recovery, and capability enhancement for the Strands agent harness (@strands-agents/cli). Enforces 429 exponential backoff, zero-token local Ollama routing, native macOS vision OCR MCP servers, and parity with Antigravity and Grok autonomy.
- Reads credentials
- Deletes or force-pushes
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 9
Ensure the Strands CLI harness (@strands-agents/cli) operates continuously, resiliently, and autonomously without operator intervention.
- Distinctive: line 54
Rule: When Strands encounters HTTP 429, it must never crash or throw unhandled errors to Ghostty.
- Very specific: line 61
When cloud quotas are constrained or privacy is paramount, route Strands to local Ollama on http://127.0.0.1:11434:
- Very specific: line 83
Autonomous Tool Execution: Keep "mode": "bypassPermissions" enabled in ~/.strands/cli/config.json for autonomous execution.
- Very specific: line 84
Screenshot Inspection: When the user supplies screenshot paths (e.g.
- Distinctive: line 85
Evidence-First Verification: Verify all code changes, test suites, and terminal commands with explicit stdout/stderr evidence before …
- Very specific: line 93
Taint Tracking & Exfiltration Diode: When Strands reads sensitive files (.env, credentials, customer_data), the session is marked tainted.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Strands Harness Sentinel
Core Mission
Ensure the Strands CLI harness (@strands-agents/cli) operates continuously, resiliently, and autonomously without operator intervention. Defend Strands against rate limits, API quota exhaustion, permission prompts, and model deprecation.
Target: Empower Strands to match the speed, vision capability, and execution power of Google Antigravity and xAI Grok.
1. System Architecture & Locations
- Launcher:
/Users/iganapolsky/.local/bin/strands- Injects
GEMINI_API_KEYandGOOGLE_API_KEYfrom~/.zshrc. - Injects
OLLAMA_HOST="http://127.0.0.1:11434". - Dispatches to
/opt/homebrew/bin/strands->/opt/homebrew/lib/node_modules/@strands-agents/cli/bin/strands.js.
- Injects
- Config:
~/.strands/cli/config.json - Vision MCP Server:
/Users/iganapolsky/.strands/mcp/vision-server.mjs- Uses native Swift binary
/opt/homebrew/bin/mac-ocr(Apple Vision Framework). - Sub-300ms OCR execution on any local image or screenshot path.
- Uses native Swift binary
2. Rate-Limit Recovery & 429 Self-Healing
The 15 RPM Problem
Google AI Studio's Free Tier enforces a hard quota of 15 requests per minute (RPM) for generate_content_free_tier_requests on models like gemini-3.5-flash-lite. When an agent chains multiple tool calls in rapid succession (e.g. 15 tool calls in 40s), call #16 throws:
HTTP 429: Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 15. Please retry in 2.8s.Self-Healing Diode
The GenAI client in /opt/homebrew/lib/node_modules/@strands-agents/cli/node_modules/@google/genai/dist/node/index.mjs is patched with an exponential retry loop inside runFetch():
for (let attemptNum = 0; attemptNum < 4; attemptNum++) {
try {
response = await fetchFunc(url, Object.assign({}, requestInit, { signal: attempt.signal }));
if (response.status === 429 && attemptNum < 3) {
const waitSec = attemptNum === 0 ? 3 : (attemptNum + 1) * 3;
await new Promise(r => setTimeout(r, waitSec * 1000));
continue;
}
break;
} catch (e) {
if (attemptNum >= 3) { attempt.dispose(); throw e; }
await new Promise(r => setTimeout(r, 2000));
}
}Rule: When Strands encounters HTTP 429, it must never crash or throw unhandled errors to Ghostty; it must sleep for the required window (3s) and resume execution automatically.
3. Provider Routing & Local Fallback
Zero-Token Offline Mode (Ollama)
When cloud quotas are constrained or privacy is paramount, route Strands to local Ollama on http://127.0.0.1:11434:
# High reasoning + tools (14.8B)
strands --model "ollama/qwen2.5:14b"
# General coding + tools (8B)
strands --model "ollama/llama3.1:latest"
# Deep thinking + tool calling (20B)
strands --model "ollama/gpt-oss:20b"Cloud Gemini Mode
For heavy multimodal / long-context tasks:
strands --model "google/gemini-flash-lite-latest"4. Autonomous Autopilot Directives (Antigravity & Grok Parity)
- Autonomous Tool Execution: Keep
"mode": "bypassPermissions"enabled in~/.strands/cli/config.jsonfor autonomous execution; all tool calls remain strictly gated and validated by ThumbGate PreToolUse and Strands Box diodes. - Screenshot Inspection: When the user supplies screenshot paths (e.g.
/Users/iganapolsky/Desktop/Screenshot...), Strands must immediately trigger the vision MCP server (inspect_screenshot) before taking action. - Evidence-First Verification: Verify all code changes, test suites, and terminal commands with explicit stdout/stderr evidence before declaring victory.
5. Strands Box & Dogwood Containment (strands-box-diode.js)
Per AWS Open Source announcement (Introducing Strands Box: AI agent sandboxes powered by Dogwood), Strands Box provides OS containment paired with fine-grained policy:
- Taint Tracking & Exfiltration Diode: When Strands reads sensitive files (
.env,credentials,customer_data), the session is marked tainted. Subsequent outbound HTTP calls are blocked unless hitting an explicit local/audit allowlist. - Zero-Secret-Egress Credential Injection: The agent operates with dummy placeholder tokens (
strands_placeholder_token). The egress gateway injects live Authorization headers (Bearer ...) on outbound requests, preventing secret leakage into LLM context. - Decomposed Command Interception: Decomposes compound commands (e.g.
rm -rf) into individualfs:deleteevents before execution, blocking root or parent directory destruction. - Sliding-Window Frequency Caps: Prevents spam or API flooding (e.g. max 3 Slack alerts per 10 minutes).
Verify with:
npm run strands-box:doctor6. Multi-Harness RL Invariants (FineEnvs Steal)
Per Hugging Face FineEnvs/multi-harness-rl, models overfit to their native harness and suffer catastrophic format failures when transferring to foreign harnesses.
ThumbGate normalizes tool calls across Claude Code, Antigravity, Strands, and OpenHands to canonical quadruplets (entity, op, target, params) and calculates cross-harness invariant rewards:
npm run test:strands-boxIn this repository98 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .well-known/llms.txtllms.txt
- activesaddler-curriculum-honestySkill
- article-syndication-pipelineSkill
- autonomous-execution-mandateSkill
- aws-strands-harness-not-cloneSkill
- bolt-forge-opt-in-not-cloneSkill
- ci-gha-buildkite-patterns-not-cloneSkill
- cobble-hot-store-compare-not-cloneSkill
- colab-compute-honesty-not-cloneSkill
- comet-session-loggerSkill
- craft-playbook-gateSkill
- cyberstrike-compare-not-cloneSkill
- datadog-llm-obs-compare-not-cloneSkill
- decisive-step-evaluatorSkill
- deeppattern-discipline-honesty-not-cloneSkill
- earnie-third-author-governanceSkill
- embeddinggemma-multimodal-firewallSkill
- fiddler-control-plane-honestySkill
- gitlab-sandbox-allowlist-not-trustSkill
- graphifySkill
- halo-trace-optimize-not-cloneSkill
- harness-evolution-ceilingSkill
- ideabrowser-connectorSkill
- infoq-architect-honesty-not-cloneSkill
- jit-harness-compare-not-cloneSkill
- meko-datapack-honesty-not-cloneSkill
- mintlify-knowledge-honesty-not-cloneSkill
- model-distress-governanceSkill
- multi-harness-rl-invariantsSkill
- nvidia-specdecode-al-doctorSkill
- omp-coordination-honesty-not-cloneSkill
- openui-catalog-compose-honestySkill
- package-manager-honesty-doctorSkill
- qwenwork-policy-group-honesty-not-cloneSkill
- saas-moat-honesty-not-cloneSkill
- salt-code-policy-honesty-not-cloneSkill
- show-meSkill
- siren-mcp-governanceSkill
- skool-headless-readerSkill
- snapchat-abm-playbook-stealSkill
- tailscale-p2p-governance-not-cloneSkill
- thumbgate-board-loopSkill
- thumbgate-daily-discoveriesSkill
- thumbgateSkill
- token-shunt-honesty-not-cloneSkill
- typesafe-typed-questions-not-cloneSkill
- vs-coverage-gap-not-cloneSkill
- vulnerability-pre-action-diodeSkill
- windbg-evidence-diagnosticsSkill
- wisdom-context-artifact-not-cloneSkill
- zero-outbound-spend-they-pay-usSkill
- zvec-grep-compare-not-cloneSkill
- ci-failure-triageSkill
- evidence-first-answerSkill
- fleet-coordinationSkill
- paranoid-mode-honesty-not-cloneSkill
- revenue-truthSkill
- scope-disciplineSkill
- The first 60 shown.
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.

