codexconfig

package
v0.2.0-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 10 Imported by: 0

README

Codex terminal focus configuration

Codex's shared app server runs hooks separately from its terminal clients. baum identifies a client by the thread ID in its terminal title. Codex's default title contains only the spinner and project, so baum configures tui.terminal_title with thread-id last when connecting or updating the Codex plugin. Existing users get the same repair when Focus cannot locate their terminal. Running terminal sessions need restarting and resuming to load the new preference; baum reports this instead of asking for a manual TOML edit. A terminal must allow application title updates.

EnsureTerminalTitle uses $CODEX_HOME/config.toml, defaulting to ~/.codex/config.toml. Missing titles keep Codex's default spinner and project items. Custom items stay in order, with thread-id moved to the end where the focuser expects it; an empty title becomes just thread-id. Already configured files are left byte-for-byte unchanged. Unrelated settings and comments are preserved, including hook trust and profile settings. Project or command-line overrides of the terminal title still take precedence over this user default.

Edits support table, dotted-key and inline-table TOML. Invalid TOML or unexpected setting types are left unchanged with an actionable error; parser source lines are omitted because they may contain credentials. Writes use a temporary file and atomic rename, retain an existing file's permissions and symlink target, create new files with mode 0600, serialize within the process and refuse to replace a config changed during the edit. Plugin removal leaves this terminal preference alone.

Run the helper, Focus repair and installer regression tests in Docker:

just oss-go test -race ./internal/codexconfig ./internal/focus ./internal/hookcli

Documentation

Overview

Package codexconfig configures the terminal title baum needs to focus Codex.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureTerminalTitle

func EnsureTerminalTitle() (bool, error)

EnsureTerminalTitle puts thread-id last in the user's title, preserving their other items. It returns whether Codex needs restarting to load a change.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL