Commit Graph
18144 Commits
Author SHA1 Message Date
Michael Bolin 6aaca8ca40 merge commit for archive created by Sapling 2026-07-01 22:58:40 -07:00
Michael Bolin 8b6f7077be exec-server: log structured timing events 2026-07-01 22:56:14 -07:00
Michael Bolin c899466b7d telemetry: log structured tool and inference timing events 2026-07-01 22:56:14 -07:00
Michael Bolin 77d79135d0 merge commit for archive created by Sapling 2026-07-01 22:42:06 -07:00
Michael Bolin 441a453cc1 exec-server: log structured timing events 2026-07-01 22:40:53 -07:00
Michael Bolin 39af213361 telemetry: log structured tool and inference timing events 2026-07-01 22:40:44 -07:00
Michael Bolin b0dc58a2c1 Merge f530914a54 into sapling-pr-archive-bolinfest 2026-07-01 22:14:43 -07:00
Michael Bolin f530914a54 telemetry: log structured tool timing events 2026-07-01 22:14:36 -07:00
Michael Bolin 129ea2aaf5 Log multi-agent communication lifecycle (#30872)
## Why

[#30867](https://github.com/openai/codex/pull/30867) makes
`submit_inter_agent_communication` the common outbound sink for
multi-agent v2 communications. This follow-up uses that single point to
log every communication lifecycle without requiring new hooks as spawn,
messaging, follow-up, or result paths evolve.

For each communication, the logs need to identify its type, sender and
receiver threads, and content, while correlating the successful send
with receipt by the destination mailbox. The logging path must not query
externally supplied time providers because those calls can be expensive
for app-server clients.

## What changed

- Added structured `INFO` events on the OpenTelemetry-exported
`codex_otel.agent_communication` target for `spawn`, `message`,
`followup`, and `result` communications.
- Logged successful sends from `submit_inter_agent_communication` with
the communication kind, sender and receiver thread IDs, content, and
submission ID.
- Logged receives after the communication has been enqueued in the
receiver mailbox, using the same submission ID.
- Avoided time-provider calls and other asynchronous work in the logging
path.
- Narrowed ordinary spawn and send-input APIs to `Vec<UserInput>` so
`Op::InterAgentCommunication` cannot bypass the context-bearing
centralized path.

The refactor does not change submission IDs, capacity checks, last-task
bookkeeping, mailbox ordering, protocol types, rollout data, or
model-visible context.

## Event shape

Illustrative JSON representation of the two independently emitted
records:

```json
[
  {
    "event.name": "codex.agent_communication",
    "communication_id": "019f20e1-40d1-7890-a123-456789abcdef",
    "kind": "spawn",
    "state": "send",
    "sender_thread_id": "019f20df-fbe1-7890-a123-456789abcdef",
    "receiver_thread_id": "019f20e1-3f79-7890-a123-456789abcdef",
    "content": "inspect the repository"
  },
  {
    "event.name": "codex.agent_communication",
    "communication_id": "019f20e1-40d1-7890-a123-456789abcdef",
    "state": "receive"
  }
]
```

Consumers join the receive record to the send record by
`communication_id` for the immutable communication metadata.

## Testing

- Extended the existing end-to-end multi-agent v2 spawn test to verify
content, both thread IDs, and a correlated send/receive submission ID.
- Re-ran focused control and handler coverage for direct messages,
follow-up tasks, and completion results.
2026-07-01 18:11:09 -07:00
Michael Bolin 7245964ad8 merge commit for archive created by Sapling 2026-07-01 17:51:23 -07:00
Michael Bolin 2af759b764 Log multi-agent communication lifecycle 2026-07-01 17:51:10 -07:00
Michael Bolin a0e6052ed1 Merge be18a5e07f into sapling-pr-archive-bolinfest 2026-07-01 17:38:46 -07:00
Michael Bolin be18a5e07f Log multi-agent communication lifecycle 2026-07-01 17:38:37 -07:00
Michael Bolin 2fd8feb389 Merge 4123e516f3 into sapling-pr-archive-bolinfest 2026-07-01 17:33:18 -07:00
Michael Bolin 4123e516f3 Log multi-agent communication lifecycle 2026-07-01 17:33:11 -07:00
Michael Bolin 4cc5b85972 merge commit for archive created by Sapling 2026-07-01 17:19:14 -07:00
Michael Bolin 5a2bbd4b2e Log multi-agent communication lifecycle 2026-07-01 17:19:03 -07:00
Michael Bolin 83044192b8 Merge 64280aa283 into sapling-pr-archive-bolinfest 2026-07-01 17:08:45 -07:00
Michael Bolin 64280aa283 Log multi-agent communication lifecycle 2026-07-01 17:08:27 -07:00
Michael Bolin a98a21798c Consolidate multi-agent v2 communication sends (#30867)
## Why

Multi-agent v2 communications currently use separate outbound paths:
direct messages, follow-up tasks, and completion results go through
`send_inter_agent_communication`, while a spawn's initial message goes
through the generic input submission path. That split makes it difficult
to add complete communication lifecycle logging in one place.

This refactor makes `submit_inter_agent_communication` the common sink
for those paths, preparing the follow-up observability work discussed in
[#30516](https://github.com/openai/codex/pull/30516).

## What changed

- Routed all current outbound `InterAgentCommunication` paths in
`AgentControl`—direct messages, follow-up tasks, completion results, and
multi-agent v2 spawn initial messages—through
`submit_inter_agent_communication`.
- Centralized the actual submission and last-task-message bookkeeping
there, providing one place for the follow-up PR to instrument
communication creation and successful enqueue.
- Left non-communication input handling and the multi-agent v1 spawn
flow unchanged.

## Testing

- `just test -p codex-core 'agent::control::tests::'` (51 passed)
- `just test -p codex-core
'suite::subagent_notifications::encrypted_multi_agent_v2_spawn_sends_agent_message_to_child'`
(passed)








---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/30867).
* #30872
* __->__ #30867
2026-07-01 17:08:11 -07:00
Michael Bolin 9b09317904 merge commit for archive created by Sapling 2026-07-01 16:36:30 -07:00
Michael Bolin 82ed1d2426 Log multi-agent communication lifecycle 2026-07-01 16:36:21 -07:00
Michael Bolin 9268f6b90e merge commit for archive created by Sapling 2026-07-01 16:11:24 -07:00
Michael Bolin 7f74f9a2e2 Log multi-agent communication lifecycle 2026-07-01 16:11:16 -07:00
Michael Bolin b2eae13726 merge commit for archive created by Sapling 2026-07-01 16:02:45 -07:00
Michael Bolin 2952ea8610 Log multi-agent communication lifecycle 2026-07-01 16:02:37 -07:00
Michael Bolin 6327da10ce merge commit for archive created by Sapling 2026-07-01 15:56:24 -07:00
Michael Bolin 15fafe38fe Log multi-agent communication lifecycle 2026-07-01 15:56:15 -07:00
Michael Bolin 9fca82fb6e Merge 81c79f11b8 into sapling-pr-archive-bolinfest 2026-07-01 15:52:46 -07:00
Michael Bolin 81c79f11b8 Log multi-agent communication lifecycle 2026-07-01 15:52:28 -07:00
Michael Bolin fa926ef695 merge commit for archive created by Sapling 2026-07-01 15:51:41 -07:00
Michael Bolin eab365453d Log multi-agent communication lifecycle 2026-07-01 15:51:22 -07:00
Michael Bolin 6eed12cd67 merge commit for archive created by Sapling 2026-07-01 15:31:48 -07:00
Michael Bolin 425acfd752 Log multi-agent communication lifecycle 2026-07-01 15:31:35 -07:00
Michael Bolin 8fdb295c87 Merge a02b5c5627 into sapling-pr-archive-bolinfest 2026-07-01 15:09:12 -07:00
Michael Bolin a02b5c5627 Log multi-agent communication lifecycle 2026-07-01 15:08:50 -07:00
Michael Bolin c27ad497d3 merge commit for archive created by Sapling 2026-07-01 14:27:05 -07:00
Michael Bolin f6dcc0e68b Consolidate multi-agent v2 communication sends 2026-07-01 14:26:56 -07:00
Michael Bolin c75d0fd58e merge commit for archive created by Sapling 2026-07-01 14:17:59 -07:00
Michael Bolin 88aee5b579 Consolidate multi-agent v2 communication sends 2026-07-01 14:17:46 -07:00
richardopenai 042e61726d [codex] bound Rendezvous WebSocket liveness (#30643)
## Summary

- require a Pong within 60 seconds for established Noise Rendezvous
WebSockets on both the harness and executor
- bound steady-state WebSocket writes and harness event delivery so
backpressure cannot mask the deadline
- classify executor disconnects with bounded reasons and feed them into
the existing reconnect metric and structured log
- cover silent peers, responsive peers, continuous non-Pong traffic, and
local application backpressure

## Why

The existing periodic Pings did not track Pongs, so a half-open or
blackholed connection could remain stuck until the operating system's
TCP timeout. This adds the smallest explicit liveness contract without
new spans, RTT histograms, feature flags, or TCP diagnostics.

## Testing

- `just test -p codex-exec-server` on devbox `richard-6` — 300 passed, 2
skipped
- `just fix -p codex-exec-server`
- `just fmt`
- independent correctness, performance/security, and YAGNI reviews — no
findings
2026-07-01 14:15:34 -07:00
Michael Bolin 164a107bb7 merge commit for archive created by Sapling 2026-07-01 14:09:14 -07:00
Michael Bolin 4862e6254f Consolidate multi-agent v2 communication sends 2026-07-01 14:09:02 -07:00
Michael Bolin 749dfd6a93 merge commit for archive created by Sapling 2026-07-01 14:03:32 -07:00
Michael Bolin bc305225e9 Consolidate multi-agent v2 communication sends 2026-07-01 14:03:21 -07:00
Michael Bolin 96646dc647 Merge b1d06b8c05 into sapling-pr-archive-bolinfest 2026-07-01 13:53:46 -07:00
Michael Bolin b1d06b8c05 Consolidate multi-agent v2 communication sends 2026-07-01 13:53:22 -07:00
Michael Bolin d059658ad1 docs: add tag to fenced code block (#30851)
Now consistent with the other examples and the syntax highlighting is
improved.
2026-07-01 10:59:02 -07:00
Michael Bolin a37c19268d Merge 20b5c92efe into sapling-pr-archive-bolinfest 2026-07-01 10:58:15 -07:00
Michael Bolin 20b5c92efe docs: add tag to fenced code block 2026-07-01 10:58:06 -07:00