* feat(plugins): append agent instructions on session open Recompute plugin instructions for each launch so changes apply on reopen without changing saved agent configuration. * test(providers): verify plugin instructions on reopen * fix(codex): refresh instructions from restored collaboration mode A resumed thread can retain its prior collaboration instructions when the mode catalog is unavailable. Rebuild those instructions from the current launch before the next turn. * fix(plugins): keep launch instructions out of agent records Provider persistence handles can contain launch configuration. Strip transient instructions before saving and projecting handles. * fix(codex): preserve built-in collaboration instructions Pass agent instructions through the thread configuration so Codex can apply its own Plan and Default mode instructions. * fix(opencode): preserve instructions when reading history History-only opens do not apply current plugin contributions, so they must not clear the native session instruction entry. * fix(codex): retain instructions after rewinding A rewind forks the native thread, which does not inherit its parent launch instructions. Pass the current instructions to the fork. * Deliver updated instructions to Codex threads * Cover Codex snapshots after rewind * Persist provider state when reopening agents * Limit resume persistence refresh to providers that need it
Agent configuration
Sets saved Codex options through server.addHook("agent.create.before", async ...):
- Sets
config.providerOptions.sandbox_modetoworkspace-write. - Sets
config.providerOptions.approval_policytoon-request. - Preserves other configuration and provider options.
Adds the company MCP server to Codex launches, skipping background agents, through
server.addHook("agent.open.before", async ...). The server is never saved in the agent's configuration;
existing saved MCP servers are preserved. Existing agents receive the server through the
session reopen behavior.
Replace https://tools.example.com/mcp in index.server.ts with your MCP server URL before using
this example. A company name collision with a saved server or another
plugin fails the session open and names both sources.
Install on a daemon with plugins enabled:
paseo plugin install /absolute/path/to/plugin-examples/agent-configuration
Each session-open callback receives only this plugin's MCP servers. The nested spreads preserve entries added by this plugin's earlier callbacks. The create callback receives configuration after earlier plugins have transformed it; its explicit Codex options replace the named fields in the saved configuration of new agents and remain after this plugin is disabled.
See Inject MCP servers for choosing between saved configuration and plugin-owned servers. Lifecycle actions demonstrates provider switching and environment injection. Its provider-switch callback clears provider options when changing Codex to Claude, so use these examples separately when trying the Codex-specific settings.