Agent configuration (TOML)
Gestalt agent profiles live in .gestalt/config/agents/*.toml. JSON agent configs are not supported. Each file defines a single agent profile, keyed by filename (agent ID).
Base fields
All agent files support the following fields:
name(string, required): Human-readable name shown in the UI.shell(string, optional): Explicit shell command. Required if no CLI config keys are set.interface(string, optional):clionly (defaultcli).cli_type(string, optional): CLI type (e.g.,codex,copilot). Required when CLI config keys are set.prompt(string or array, optional): Prompt names (no extension) to inject (Codex renders these intodeveloper_instructions).skills(array, optional): Skill names to inject (Codex renders these intodeveloper_instructions).onair_string(string, optional): Wait for this string before prompt injection (non-Codex only).singleton(bool, optional, deprecated): Parse-compatible only. Runtime always enforces one canonical session per agent (<AgentName> 1). Settingsingleton = falselogs a deprecation warning and has no runtime effect.model(string, optional): Model hint for UI/API.hidden(bool, optional): If true, hide from Dashboard buttons only.
Prompt names resolve against .gestalt/config/prompts, trying .tmpl, .md, then .txt.
Any additional top-level keys (outside the base fields) are treated as CLI config and validated. A legacy [cli_config] table is still accepted, but no longer required.
Migration notes
- External
gestalt-agentsessions no longer use a runner websocket bridge. The CLI now launches tmux and exits. - For rollback during incident response, restore the previous runner bridge route/handlers and
gestalt-agentbridge entrypoint in a single revert commit.
gestalt-agent CLI
gestalt-agent <agent-id> connects to a running Gestalt server, registers an external session, and runs the agent in tmux.
- Requires a running server (
--host,--port,--token/GESTALT_TOKEN). - Requires
tmuxonPATH. - The
agent-idis the filename in.gestalt/config/agents/*.toml(coderandcoder.tomlare equivalent). - Prompt rendering and session defaults come from the server response.
- After session creation, the CLI attaches tmux (
tmux attachortmux switch-client). --dryrunprints the resolved tmux attach command without executing it.
CLI config validation
- CLI config keys are validated against a per-CLI JSON Schema.
- Validation errors include file name and (when possible) the line/field.
- Invalid agent files are skipped with a warning.
Schemas live in internal/agent/schemas/:
codexschema:internal/agent/schemas/codex.gocopilotschema:internal/agent/schemas/copilot.go
Shell command generation
When CLI config keys are present, Gestalt generates the shell command at session creation:
- Codex:
codex -c key=valuefor each config entry.- Nested tables flatten to dot notation (e.g.,
tui.scroll_mode). - Arrays repeat
-c key=valuefor each entry.
- Nested tables flatten to dot notation (e.g.,
- Copilot:
copilot --flag valuefor each entry.- Boolean flags use
--flagor--no-flag. - Arrays repeat
--flag valuefor each entry.
- Boolean flags use
The generated command replaces any explicit shell value when agents are loaded.
If no CLI config keys are set, shell is used as-is.
Prompt injection (Codex)
For cli_type="codex", Gestalt renders skills + prompt files into a single developer_instructions value before the session starts. Prompt text is not typed into the terminal stream. Any developer_instructions provided in the CLI config is overwritten by the rendered content.
For non-Codex CLIs, prompt files are still typed into the terminal after the onair_string (or a short delay if none is provided).
Codex notify vs tui.notifications
notify is a Codex root key that defines an argv array for notifier hooks. tui.notifications is separate and only controls OSC 9 popups in the TUI.
Gestalt injects a notify hook for Codex sessions at runtime (overriding any existing notify value) so Flow automations can react to notify events:
notify = ["gestalt-notify", "--host", "127.0.0.1", "--port", "57417", "--session-id", "<session-id>"]Examples
Example files live in config/agents/:
codex-full-example.tomlcopilot-example.tomlsimple-shell-example.toml
Codex (TOML)
name = "Codex"
cli_type = "codex"
interface = "cli"
prompt = ["coder"]
model = "o3"
approval_policy = "on-request"
sandbox_mode = "workspace-write"Copilot (TOML)
name = "Copilot"
cli_type = "copilot"
model = "gpt-5"
allow_all_tools = trueSimple custom shell
name = "Custom Shell"
shell = "/bin/bash"Hidden agent
name = "Ops"
shell = "/bin/bash"
hidden = trueCodex CLI config reference (schema keys)
All fields are optional. Some keys live inside nested tables (e.g., active_project.trust_level); use TOML tables to nest as needed.
analytics.enabledapproval_policychatgpt_base_urlcheck_for_update_on_startupcli_auth_credentials_storecodex_homecodex_linux_sandbox_execompact_promptcwddeveloper_instructionsdisable_paste_burstexperimental_compact_prompt_fileexperimental_instructions_fileexperimental_use_freeform_apply_patchexperimental_use_unified_exec_toolfeaturesfeedback.enabledfile_openerforced_chatgpt_workspace_idforced_login_methodghost_snapshothide_agent_reasoninghistoryinstructionsmcp_oauth_credentials_storemcp_serversmodelmodel_auto_compact_token_limitmodel_context_windowmodel_providermodel_providersmodel_reasoning_effortmodel_reasoning_summarymodel_supports_reasoning_summariesmodel_verbositynoticenotifyoss_providerotelprofileprofilesproject_doc_fallback_filenamesproject_doc_max_bytesproject_root_markersprojectsreview_modelsandbox_modesandbox_workspace_writeshell_environment_policyshow_raw_agent_reasoningtool_output_token_limittools.web_searchtools.view_imagetui.alternate_screentui.animationstui.notificationstui.scroll_events_per_ticktui.scroll_inverttui.scroll_modetui.scroll_trackpad_accel_eventstui.scroll_trackpad_accel_maxtui.scroll_trackpad_linestui.scroll_wheel_like_max_duration_mstui.scroll_wheel_linestui.scroll_wheel_tick_detect_max_mstui.show_tooltipswindows_wsl_setup_acknowledged