Repository navigation
Closed
Description
Summary
The Codex App /loopx <task> flow can accidentally create a second agent lane when the same Codex thread already selected an agent identity earlier.
start-goal --guided correctly fails closed when a goal has multiple registered agents and the caller omits --agent-id. However, the Codex skill has no durable thread-to-agent binding and does not explicitly require a later invocation in the same thread to reuse its previously selected identity. An agent can therefore misread the generic selection gate as a new-peer onboarding case and register another lane.
Expected behavior
- A later
/loopx <task>invocation in the same Codex thread reuses the agent ID already selected by that thread, or supplies that ID tostart-goalexplicitly. - When multiple lanes exist but the current thread identity cannot be recovered, the gate says to select an existing lane and explicitly says not to register a new one unless the user requested a new peer/session.
- A new agent ID is registered only for a genuinely new agent connection or an explicit user request.
Actual behavior
- The CLI sees only the registered-agent list and an omitted
--agent-id. - It emits
selection_requiredwith all registered lanes, but no current-thread identity or same-thread reuse hint. - The current Codex skill calls
start-goalwithout carrying a previously selected thread identity and contains no same-thread reuse rule.
Minimal reproduction
- Connect a synthetic goal and register two agent IDs.
- In one Codex App thread, select the first agent and run a LoopX task.
- In the same thread, invoke
/loopx <another task>without explicitly naming an agent. - Observe that
start-goal --guidedreturns a generic multi-agent identity gate; neither the packet nor the skill identifies the first agent as the current thread's identity.
Suggested direction
- Add a public-safe Codex thread/session identity binding for
goal_id + agent_id, when the host exposes a stable opaque thread ID. - Make the
/loopxskill pass the known current-thread agent ID on laterstart-goal, heartbeat, quota, and Todo commands. - Add explicit gate copy: reuse an existing current-session lane; do not call
register-agentunless a new peer/session was explicitly requested. - Add a smoke covering two
/loopxinvocations in one thread and a contrast case where an explicit new-peer request creates a fresh ID.
Environment
- LoopX CLI:
0.4.1 - Host surface: Codex App
Metadata
Metadata
Assignees
Labels
No labels
Activity