Skip to content

feat: add hooks example for Claude, Codex, and OpenCode#225

Open
NathanFlurry wants to merge 1 commit intomainfrom
hooks-example
Open

feat: add hooks example for Claude, Codex, and OpenCode#225
NathanFlurry wants to merge 1 commit intomainfrom
hooks-example

Conversation

@NathanFlurry
Copy link
Member

Summary

  • Adds examples/hooks/ demonstrating how to write agent hook configs via the filesystem API inside a Docker sandbox
  • Covers all three agents: Claude Code (settings.json Stop hook), Codex CLI (config.toml notify), and OpenCode (opencode.json plugin)
  • Sends a prompt to each agent and verifies hooks fired by reading back a shared log file

Test plan

  • Typechecks clean (pnpm --filter @sandbox-agent/example-hooks typecheck)
  • End-to-end tested with SANDBOX_AGENT_DEV=1 pnpm start — Claude=PASS, OpenCode=PASS, Codex=FAIL (credential scope issue, not hook-related)

🤖 Generated with Claude Code

Demonstrates using the filesystem API to write agent hook configs
inside a Docker sandbox, then verifies they fire by prompting each
agent and reading back a shared log file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@railway-app
Copy link

railway-app bot commented Mar 10, 2026

🚅 Deployed to the sandbox-agent-pr-225 environment in sandbox-agent

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web Mar 10, 2026 at 3:50 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant