I was trying to use AX as a way to orchestrate coding agents (Claude Code, Codex, and so on), wrapping each one as a remote agent. But I noticed it's impossible to carry agent-private metadata across executions in the same conversation, which blocks the whole pattern.
The concrete case: Claude Code's CLI has a session id you can set with --session-id <uuid> and resume later with --resume <uuid>. When my wrapper handles a follow-up ax exec --conversation <id>, it needs to know which CC session belongs to that AX conversation. Codex has the same shape, and any wrapped agent that holds server-side state addressable by id will. That session id shouldn't show up in the visible history that other agents see on handoff either, since it isn't real user content.
I assumed Message.internal_only would cover this. The proto comment says "stored only in the execution log for resumption", which I read as cross-exec. It isn't: outputCapturer in internal/controller/controller.go strips internal-only messages before they hit conversation_log, and tryResuming builds the replayed history from conversation_log only. The marker survives in execution_log but never reaches the next exec. AgentStart.agent_config isn't carried across execs either.
What I'm doing for now is keeping the mapping in the wrapper itself, an in-memory map of conversation id to CC session id. It works, but it means every wrapper has to ship its own durable store on the side just to remember one uuid per conversation, which is exactly the kind of thing I was hoping AX's event log would handle.
Would it make sense to keep internal_only messages in conversation_log but tag them so they're only replayed back to the originating agent, filtered out for clients and other agents? That matches what the proto comment already implies and unblocks this pattern without a new field.
Happy to share the wrapper if useful.
I was trying to use AX as a way to orchestrate coding agents (Claude Code, Codex, and so on), wrapping each one as a remote agent. But I noticed it's impossible to carry agent-private metadata across executions in the same conversation, which blocks the whole pattern.
The concrete case: Claude Code's CLI has a session id you can set with
--session-id <uuid>and resume later with--resume <uuid>. When my wrapper handles a follow-upax exec --conversation <id>, it needs to know which CC session belongs to that AX conversation. Codex has the same shape, and any wrapped agent that holds server-side state addressable by id will. That session id shouldn't show up in the visible history that other agents see on handoff either, since it isn't real user content.I assumed
Message.internal_onlywould cover this. The proto comment says "stored only in the execution log for resumption", which I read as cross-exec. It isn't:outputCapturerininternal/controller/controller.gostrips internal-only messages before they hitconversation_log, andtryResumingbuilds the replayed history fromconversation_logonly. The marker survives inexecution_logbut never reaches the next exec.AgentStart.agent_configisn't carried across execs either.What I'm doing for now is keeping the mapping in the wrapper itself, an in-memory map of conversation id to CC session id. It works, but it means every wrapper has to ship its own durable store on the side just to remember one uuid per conversation, which is exactly the kind of thing I was hoping AX's event log would handle.
Would it make sense to keep internal_only messages in conversation_log but tag them so they're only replayed back to the originating agent, filtered out for clients and other agents? That matches what the proto comment already implies and unblocks this pattern without a new field.
Happy to share the wrapper if useful.