# harnez

> Practical notes on experiments, case studies, workflows, and techniques for using Claude, Codex, and similar coding agents effectively.

## Machine-readable resources

- [Developer guide](https://harnez.ai/developers/): API, Markdown, discovery, and usage guidance.
- [Article API](https://harnez.ai/api/posts.json): public JSON index of published articles.
- [OpenAPI contract](https://harnez.ai/openapi.json): typed description of the public API.
- [Sitemap](https://harnez.ai/sitemap.xml): complete indexable URL list.
- [Robots policy](https://harnez.ai/robots.txt): crawler access and discovery links.

## Posts

- [One company gateway, any coding harness](https://harnez.ai/posts/one-company-gateway/) (2026-08-24): HarnezPad routes Claude Code, Codex, ChatGPT, and OpenCode through one company LLM gateway without putting the management key on disk.
- [Resume work across coding agents with a session handoff](https://harnez.ai/posts/resuming-sessions-across-coding-agents/) (2026-08-24): A read-only adapter resolves Claude Code, Codex, or Cursor history as inert data, builds a minimal handoff, and verifies current repository state before continuation.
- [Customize OpenCode v2 for enterprise without replacing the harness](https://harnez.ai/posts/customize-opencode-for-enterprise/) (2026-08-22): How to restrict and extend stock OpenCode through a pinned v2 seam and a redistribution template: composition slots, managed policy, seeded plugins, and branded packaging.
- [Herdr is the runtime around the coding agent](https://harnez.ai/posts/herdr-is-the-runtime-around-the-coding-agent/) (2026-08-10): How an agent-aware terminal multiplexer owns live panes, processes, and lifecycle, and how Agent Factory sits above it as a control plane rather than a second runtime.
- [ACP is a client protocol, not a control plane](https://harnez.ai/posts/coding-agent-control-plane/) (2026-07-21): What the Agent Client Protocol standardizes, what it leaves to the host, and how Coding Agent Control Plane composes project, environment, provider, model, and harness before any handshake.
- [How codex-action sandboxes Codex in GitHub Actions](https://harnez.ai/posts/sandboxing-codex-in-github-actions/) (2026-07-07): How codex-action separates command permissions, host privileges, proxy key handling, actor authorization, and post-execution isolation on a GitHub runner.
- [Codex hooks: enforce policy at lifecycle boundaries](https://harnez.ai/posts/hooks-complete-tutorial/) (2026-06-23): Codex hooks run deterministic commands at 11 lifecycle events, with distinct contracts for tool policy, approval decisions, context injection, and completion gates.
- [Agent skills: package task knowledge for coding agents](https://harnez.ai/posts/agent-skills-ecosystem/) (2026-06-16): A SKILL.md file turns repeated operating instructions into discoverable, scoped task knowledge that Codex and Claude Code load on demand.
- [Codex sandboxing: separate filesystem scope from approvals](https://harnez.ai/posts/agent-sandboxing-models/) (2026-06-09): Codex treats sandbox enforcement and approval policy as separate controls, and subagents inherit the active parent runtime before role defaults apply.
- [Building a local viewer for Claude Code sessions](https://harnez.ai/posts/building-a-session-browser/) (2026-05-12): A local session viewer turns Claude Code JSONL logs into checkpoints, tool-call groups, token counts, and side-by-side comparisons.
- [Codex as a function in the incident loop](https://harnez.ai/posts/ci-cd-with-codex/) (2026-05-11): How Triage Copilot embeds the Codex SDK in a production incident SDLC: three parallel sub-agents, MCP-scoped context, Zod-validated output, and draft PRs that never auto-merge.
- [Lost in the middle: test context position, not just size](https://harnez.ai/posts/u-shaped-attention-memory-llms/) (2026-05-11): Long-context benchmarks show that relevant-information position can change accuracy, but the effect is task- and model-dependent rather than a universal attention curve.
- [Fix broken project paths in Claude Code and Codex](https://harnez.ai/posts/fix-broken-project-paths/) (2026-05-05): A macOS migration script discovers stale project paths in four Claude Code and Codex sources, then updates the related local state with explicit safety limits.
- [Treat the agent contract as versioned infrastructure](https://harnez.ai/posts/system-prompt-as-infrastructure/) (2026-04-16): Production agent behavior comes from a versioned contract spanning instructions, tools, schemas, context assembly, model selection, and release gates.
- [Turn an OpenAPI spec into an agent-facing CLI](https://harnez.ai/posts/cli-based-api-explorer/) (2026-04-06): A spec-driven CLI gives coding agents a discoverable, executable API surface without hand-maintaining one command per endpoint.
- [Workflows vs. agents: a pragmatic decision framework](https://harnez.ai/posts/workflows-vs-agents-decision-framework/) (2026-04-05): A reliability-first approach to choosing between predictable workflows and flexible agents, with four reusable patterns and concrete selection heuristics.
- [Inside the Agent SDK loop: how Claude Code runs your prompts](https://harnez.ai/posts/inside-the-agent-loop/) (2026-04-02): How Claude Code and the Agent SDK execute prompts through a five-step tool loop, expose typed lifecycle messages, and bound work with permissions, turns, and budgets.
- [What a prompt lab actually validates](https://harnez.ai/posts/iterative-prompt-engineering/) (2026-03-25): Three fixture-backed extraction lessons show how prompt contracts grow — and why an evaluation can only prove the fields its grader checks.
