coding-agent
Technical notes on web development, DevOps, and AI integration.
8 articles
- 01:54tooling
The Deny Rule That Silently Died After an OpenCode V2 Upgrade
Upgrading the harness killed an old permission config with no error. How I found the dead deny rule and proved it with a denied action attempt.
TL;DR: Frontend subagent ran arbitrary shell commands despite denied permissions. Vocabulary changes in OpenCode V2 caused the issue. Config files required manual updates.
#opencode#coding-agent#agent-rules - 04:56devops
The Slice Gate That Read Another Program's Artifacts
One program directory baked into cmd_slice let a validation gate pass on someone else's evidence; a one-line env-override fixed it.
TL;DR: A slice gate silently validated the wrong program's evidence because the program directory was hardcoded in cmd_slice. The fix was one line: read an env var first, fall back to the default, matching the existing REPO_ROOT pattern. Run tools in two contexts and compare file references to catch baked-in constants early.
#bash#coding-agent#validasi-input - 04:56devops
A Commit Gate Needs a Sanctioned Path, Not Just a Refuser
A hook that refuses direct commits is half a gate; a wrapper promised since Task 1 but never implemented turns security into a total lock.
TL;DR: The commit wrapper subcommand was promised since Task 1 but never implemented, so the gate blocked both unsafe and sanctioned paths. The fix: a 40-line cmd_commit that validates messages via the same check path before committing, with no silent rewriting. Fail-closed testing exposed the bug; write red tests for missing sanctioned paths up front.
#git-hooks#coding-agent#bash - 04:55devops
Blocking Direct Git Commits with a PreToolUse Hook
A PreToolUse hook makes bare git commit from coding-agent sessions technically impossible, not merely forbidden in a document.
TL;DR: This commit turned the review gate from a documented convention into actual enforcement, registering a PreToolUse hook that blocks bare git commit across settings and nine agent definition files. The first real test returned exit 2 because the sanctioned wrapper didn't exist yet. That rejection proved fail-closed works: a missing part never quietly permits.
#git-hooks#coding-agent#keamanan-proses - 03:01testing
Checksummed Evidence: Test Numbers Are Claims Until Verified
Raw verification output wrapped in a self-checksum makes agent numbers tamper-evident, while a fail-closed gate rejects slices without anchored review verdicts.
TL;DR: The author learned that an agent-reported "all tests passed" without raw output is a claim, not evidence. The fix: a shell script bundling command, output, and exit code, sealed with a self-verifying sha256 digest, plus a fail-closed gate requiring anchored review approvals. Honest limitation: same-session checksums only catch cheap forgery, not determined attackers.
#ai-agents#testing#qa - 15:43ai
Eleven Specialist Agent Files, One Squad: Contracts, Not Speeches
Opening eleven .claude/agents files showed me the real constraint is not persona prose: it is the tools, model, and hook fields in six lines of frontmatter.
TL;DR: Eleven subagent files are shaped more like contracts than personas: six lines of frontmatter decide tools, model, and permissions for each role. Scope tools tightly, enforce limits with hooks since rules aren't enforced, and keep every brief self-contained because agents share no context. Delegation costs tokens, so only hand off work worth splitting.
#ai-agents#claude-code#coding-agent - 13:23ai
The 26 Lines of Agent Rules I Deleted From Two Repos
I removed the no-coding block from two agent rules files. Instruction rules turned out to be loaded context, not enforcement; hooks do the enforcing.
TL;DR: He deleted the same 26-line no-coding mandate from two repos after his cron flagged the commits as duplicates. The mandate failed because instruction files are just context that fades, not enforced gates, while real blocking needs hooks and verification. He kept lean context layers and now judges per task, doing small edits directly and delegating only complex refactors to Claude.
#hermes#claude-code#ai-agents - 11:10ai
OpenHands in 2026: From CLI to the Agent Canvas Platform
The OpenHands CLI is officially deprecated in 2026. Meet Agent Canvas, learn the right way to use it, and see how it pairs with Hermes Agent.
TL;DR: OpenHands dropped its pip CLI and pivoted to Agent Canvas, a canvas-based platform installable via npm or a safer Docker sandbox scoped by PROJECTS_PATH. The SDK adds security risk levels, LiteLLM provider flexibility, and named LLM configs for cost tiering. Pair it with Hermes Agent as an orchestrator that verifies diffs before anything gets merged.
#openhands#agent-canvas#hermes