AGENTS.md instructions for /Users/tanishqpalandurkar/Projects/better-ao <INSTRUCTIONS>…
- User
AGENTS.md instructions for /Users/tanishqpalandurkar/Projects/better-ao
--- project-doc ---
Agent workflow
User will assign one PRD at a time to an agent to implement. All the PRDs are available in the
./prdsdir. - User
<environment_context> /Users/tanishqpalandurkar/Projects/better-ao zsh <current_date>2026-05-26</current_date> Asia/Kolkata </environment_context>
- User
Context from my IDE setup:
Active file: /Users/tanishqpalandurkar/.superset/hooks/notify.sh
Open tabs:
- notify.sh: /Users/tanishqpalandurkar/.superset/hooks/notify.sh
- codex.go: internal/plugin/agent/codex/codex.go
- plugin.go: internal/plugin/plugin.go
- agent.go: internal/plugin/agent/agent.go
- better-ao.mjs: scripts/better-ao.mjs
My request for Codex:
So this is a bash file that contains functions Ig that are invoked when a particular hook event is fired by a cli agent. Give me a TLDR of this file.
- Assistant
I’ll open the hook script and summarize exactly what each function does plus when it runs so you get a practical TL;DR of the event-trigger flow.
- Assistant
Here’s the TL;DR for
/Users/tanishqpalandurkar/.superset/hooks/notify.sh:- It reads the hook event JSON from CLI arg
$1(or stdin if no arg). - It extracts IDs (
session_id/resourceId/resource_idandhook_session_id) and normalizes event names across clients:- Claude/Mastra/Droid use
hook_event_name - Codex-style
typeis mapped to:agent-turn-complete/task_complete→Stoptask_started→Start- approval-related events →
PermissionRequest
UserPromptSubmitis normalized toStart.
- Claude/Mastra/Droid use
- If event type can’t be determined, it exits silently (no notification sent).
- It reads the hook event JSON from CLI arg
- User
Context from my IDE setup:
Active file: /Users/tanishqpalandurkar/.superset/hooks/notify.sh
Open tabs:
- notify.sh: /Users/tanishqpalandurkar/.superset/hooks/notify.sh
- codex.go: internal/plugin/agent/codex/codex.go
- plugin.go: internal/plugin/plugin.go
- agent.go: internal/plugin/agent/agent.go
- better-ao.mjs: scripts/better-ao.mjs
My request for Codex:
alright lets talk about if from codex hooks perspective
- Assistant
From Codex hook events specifically, this script behaves like this:
INPUTcomes from$1(or stdin), and the script reads a JSON field namedtypeto identify Codex events.- Event mapping it applies:
agent-turn-complete→Stoptask_complete→Stoptask_started→Startexec_approval_request→PermissionRequestapply_patch_approval_request→PermissionRequestrequest_user_input→PermissionRequest
- If the mapped event is empty, it exits immediately (no-op), so unknown Codex event types are dropped.
UserPromptSubmitis also normalized toStart(for non-Codex sources too).- It derives
SESSION_IDfrom eitherresourceId/resource_idorsession_id. - Then it sends to host hook endpoint if configured (
SUPERSET_HOST_AGENT_HOOK_URL+ ); if that doesn’t return 2xx, it falls back to local v1 hook endpoint ().
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.