Thin wrappers for Codex / Claude Code
Do not re-implement the HTTP protocol in each agent. Instead, wrap execgocli and pass JSON through.
Do not re-implement the HTTP protocol in each agent. Instead, wrap execgocli and pass JSON through.
Common pattern
- Point
EXECGO_URLat your ExecGo instance. - Run
execgocli toolsonce to cache or display the manifest. - For each action, build an
AgentActionRequestJSON and pipe toexecgocli act. - Poll with
execgocli wait -task-ids ....
Codex (conceptual “skill” stub)
# Pseudocode: skill definition — call the local binary
name: execgo-adapter-act
description: Submit a mature-agent action via execgocli act
command: |
exec "${EXECGO_EXECGOCLI:-execgocli}" act
input_schema:
type: object
properties:
payload_json: { type: string, description: "Full AgentActionRequest JSON" }Your runner should write payload_json to stdin of execgocli act and parse stdout JSON (ok / data / error).
Claude Code (conceptual tool)
{
"name": "execgo_adapter_act",
"description": "Run execgocli act with JSON stdin; set EXECGO_URL",
"command": ["execgocli", "act"],
"input": { "type": "object" }
}Map the agent’s structured input to AgentActionRequest before invoking the CLI.
Error handling
- Always check
"ok": falseand surfaceerror.message+error.bodyto the user. - Exit code
3onwaitmeans timeout without terminal status.
Related
- Mode A (CLI) (English)
- 模式 A(CLI) (中文)
- execgocli contract