Experience-Driven Black-Box Cost Control for Coding Agents
Python agentic-aiagentic-codingai-codingai-coding-assistantanthropicartificial-intelligenceclaude-codecodexcoding-agentcoding-agentscost-optimizationcost-reductiondeveloper-toolsgithub-copilotllmopen-sourceopenaiproductivitytoken-optimization
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "\"${PLUGIN_ROOT:-$CLAUDE_PLUGIN_ROOT}/scripts/te-hook\" --host codex",
"commandWindows": "python -X --% -u -X utf8 -c e=__import__('os').environ;r=e.get('PLUGIN_ROOT')or(e['CLAUDE_PLUGIN_ROOT']);s=__import__('sys');s.argv[:]=[r+'/scripts/te_bootstrap.py','hook','--host','codex'];__import__('runpy').run_path(s.argv[0],run_name='__main__')",
"timeout": 15
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "\"${PLUGIN_ROOT:-$CLAUDE_PLUGIN_ROOT}/scripts/te-hook\" --host codex",
"commandWindows": "python -X --% -u -X utf8 -c e=__import__('os').environ;r=e.get('PLUGIN_ROOT')or(e['CLAUDE_PLUGIN_ROOT']);s=__import__('sys');s.argv[:]=[r+'/scripts/te_bootstrap.py','hook','--host','codex'];__import__('runpy').run_path(s.argv[0],run_name='__main__')",
"timeout": 10
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "\"${PLUGIN_ROOT:-$CLAUDE_PLUGIN_ROOT}/scripts/te-hook\" --host codex",
"commandWindows": "python -X --% -u -X utf8 -c e=__import__('os').environ;r=e.get('PLUGIN_ROOT')or(e['CLAUDE_PLUGIN_ROOT']);s=__import__('sys');s.argv[:]=[r+'/scripts/te_bootstrap.py','hook','--host','codex'];__import__('runpy').run_path(s.argv[0],run_name='__main__')",
"timeout": 60
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "\"${PLUGIN_ROOT:-$CLAUDE_PLUGIN_ROOT}/scripts/te-hook\" --host codex",
"commandWindows": "python -X --% -u -X utf8 -c e=__import__('os').environ;r=e.get('PLUGIN_ROOT')or(e['CLAUDE_PLUGIN_ROOT']);s=__import__('sys');s.argv[:]=[r+'/scripts/te_bootstrap.py','hook','--host','codex'];__import__('runpy').run_path(s.argv[0],run_name='__main__')",
"timeout": 10
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "\"${PLUGIN_ROOT:-$CLAUDE_PLUGIN_ROOT}/scripts/te-hook\" --host codex",
"commandWindows": "python -X --% -u -X utf8 -c e=__import__('os').environ;r=e.get('PLUGIN_ROOT')or(e['CLAUDE_PLUGIN_ROOT']);s=__import__('sys');s.argv[:]=[r+'/scripts/te_bootstrap.py','hook','--host','codex'];__import__('runpy').run_path(s.argv[0],run_name='__main__')",
"timeout": 3
}
]
}
]
}
}