Skip to content

Codex: failure recalls inside a subagent are recorded under a session no trace will have #157

Open

Description

@aayank13

Inside a Codex subagent, hook payloads carry agent_id and session_id is the subagent's thread id. The adapter skips subagent prompts but not subagent PostToolUse, so a failing command there injects a procedure and records the injection under the child thread's id. Subagent rollouts are learned through their parent, whose trace has a different id, so the injection is never settled: its outcome is never scored and it stays in the store.

Applies to the agent support in #149.

Files:

  • crates/trodden/src/harness/codex.rs

Fix idea: ignore PostToolUse (and Stop / PreCompact) when agent_id is set.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions