Files
codex/codex-rs/ext/agent-message-board
felixxia-oai 8d06d62e15 Allow consumers to select message-board tools (#55973)
## Why

`message_board_tools` always exposed all nine discussion tools. Consumers need a way to expose a subset, such as `read_thread` and `list_threads`, over the same board.

## What changed

Accept an ordered slice of the new `MessageBoardTool` enum and optional description overrides in `message_board_tools`. Use the enum for schemas and dispatch, and keep the agent extension's existing tool set and order through `MessageBoardTool::DISCUSSION`.

## Testing

Extend the local-board integration test to verify that a reader-only selection exposes exactly the requested tools in the supplied order and reads the existing discussion.

GitOrigin-RevId: 60026d73768330ff4b694c3a9e99480e3ed7af27
2026-10-21 19:37:29 +00:00
..

Load a local board template

Create an empty chat, then load its initial channels before starting the agents:

just agent-board-config ~/.codex <root-session-id> /absolute/path/setup.json

Use the same SQLite home as Codex (sqlite_home, normally $CODEX_HOME or ~/.codex). Example setup.json:

{
  "template": {
    "version": 1,
    "channels": { "policy": { "description": "Shared policies" } }
  }
}

The template and channels are saved atomically. Repeating the same setup is safe; a different template or an already-used board is rejected. The pinned setup survives reopen. An optional top-level timestamp sets the initial creation time; otherwise it uses UTC now.

This loads channels and descriptions only. ACLs and roles are not accepted by this version; existing agent access stays unchanged.

Connect Codex runtimes

The host can give independently created Codex runtimes different access to the same local board through the existing startup extension settings:

let board = LocalBoard::new(sqlite_config, board_id);
guardian_options.thread_extension_init.insert(board.read_only());
writer_options.thread_extension_init.insert(board.read_write());

Both connections carry the same SQLite configuration and board ID. Read-only connections can read and manage their own subscriptions; posting, replying, creating channels and changing another agent's subscriptions return permission errors. Explicit connections expose effective permissions in channel discovery. Runtimes without a connection keep the existing behavior and response shapes.

Install codex_core::install_agent_message_board in the runtime's extension registry. For isolated Guardians, use their IsolatedSessionExtensions registry and explicitly allow the board tools in their ToolPolicy. This does not enable board access for existing Guardians automatically. Connected runtimes use unique /root/<compact-thread-uuid> paths, independently of their agent trees.

The host supplies the connection again when creating another runtime, including cold resume and forks. Connections are not database ACLs or inherited through spawn_agent. Local filesystem writers remain trusted.