Codex + LSP
Use this setup when you want:
- OAuth with
preset: codex - Go and Python LSP support
- an extra read-only reviewer agent
The same configuration is available as a ready-to-copy file: codex-oauth-with-lsp.yaml.
The YAML fills in a current flagship so every field is present; pick the Codex model you will actually run in Choosing models. Complete Codex sign-in and confirm the model works first, then add LSP and the reviewer as needed. Remove unused providers, pools, or roles together with their references. Install the corresponding language servers before enabling LSP.
~/.config/chord/config.yaml
Section titled “~/.config/chord/config.yaml”providers: codex: preset: codex type: responses models: gpt-6.2-sol: catalog: false limit: context: 1050000 input: 922000 output: 128000 reasoning: # Recommended example when you want readable reasoning summaries from # OpenAI Responses reasoning models. This is not Chord's implicit default: # leave `summary` unset to omit the field and use provider/model behavior. summary: auto # Optional for OpenAI GPT-5 / Responses API models. Leave unset to use # the provider/model default; set low for shorter visible text output or high # when you explicitly want more detailed visible output. # text: # verbosity: low variants: low: reasoning: effort: low medium: reasoning: effort: medium high: reasoning: effort: high xhigh: reasoning: effort: xhigh max: reasoning: effort: max modalities: input: [text, image, pdf]
fast: type: chat-completions api_url: https://api.openai.com/v1/chat/completions models: gpt-5.4-mini: limit: context: 200000 input: 183616 output: 128000
model_pools: deep: - codex/gpt-6.2-sol fast: - fast/gpt-5.4-mini
lsp: gopls: command: gopls file_types: [".go"] root_markers: ["go.work", "go.mod", ".git"] pyright: command: pyright-langserver args: ["--stdio"] file_types: [".py", ".pyi"] options: python.analysis: typeCheckingMode: standard
context: compaction: threshold: 0.8 model_pool: fast
desktop_notification: trueprevent_sleep: trueime_switch_target: com.apple.keylayout.ABClog_level: info~/.config/chord/auth.yaml
Section titled “~/.config/chord/auth.yaml”Codex OAuth credentials are usually written by chord auth codex, so you do not normally hand-edit them. They are stored under the active provider name, so with the config above auth.yaml typically contains entries like:
codex: - refresh: "..." access: "..." expires: 1774009702606 account_id: acc-1Chord can also start from a refresh-only entry and populate access, expires, and identity metadata after the first refresh:
codex: - refresh: "..."~/.config/chord/agents/reviewer.md
Section titled “~/.config/chord/agents/reviewer.md”---name: "reviewer"description: "Read-only code reviewer"mode: "subagent"model_pools: - deeppermission: "*": deny read: allow view_image: allow grep: allow glob: allow shell: "*": allow "rm *": deny "mv *": deny "git add *": deny "git commit *": deny "git push *": deny "sudo *": deny---## Role
- Review recent code changes for correctness, risk, and missing verification.- Stay read-only; do not modify project files.A few practical points matter here:
- Most models only need
limit.context: keep total input + output within that window. - Set
limit.inputonly when the provider publishes a separate input cap. Compaction ratios use that fixed cap, orlimit.context - limit.outputwhen the model’s maximum output is smaller than its window. Unknown output capacity or a capacity spanning the whole window uses the total window as the baseline. limit.outputis the model’s own output capacity. Chord defaultsmax_output_tokensto64000, so its output budget is the smaller of that cap and the model limit; changing this request cap does not change the fixed compaction baseline or any published independent input limit.- Same-named models on different providers are still tried independently in the fallback chain; Chord does not skip them just because the model name matches.
Credentials to prepare
Section titled “Credentials to prepare”Run chord auth codex for the codex provider. If you keep the fast OpenAI-compatible provider, also provide an OpenAI API key under fast in auth.yaml or through the environment reference you choose.
Install optional LSP servers before relying on diagnostics:
go install golang.org/x/tools/gopls@latestnpm install -g pyrightVerify
Section titled “Verify”chord doctor models --pool deepchord doctor models --pool fastCommon failures
Section titled “Common failures”- OAuth opens but never completes: rerun
chord auth codexin a local browser-capable environment, or use the device-code login path. fastpool fails whiledeepworks: the OpenAI API key for thefastprovider is missing or the model name differs on your account.- LSP indicators stay unavailable:
goplsorpyright-langserveris not installed onPATH.