Skip to content

feat: expose Honcho memory to Codex - #4899

Merged
damacus merged 1 commit into
mainfrom
codex/feat-honcho-codex
Nov 25, 2026
Merged

damacus merged 1 commit into
mainfrom
codex/feat-honcho-codex

Conversation

@damacus

@damacus damacus commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Adds on-demand Honcho memory to Codex through the existing LiteLLM MCP gateway. Codex gets two tools to save explicit notes and recall them by semantic search.

  • Uses a dedicated LiteLLM virtual key and a Honcho JWT scoped to the Codex workspace.
  • Allows LiteLLM to reach the private Honcho API and exposes only the two OpenAPI operations.
  • Keeps the existing Codex and Claude permissions unchanged.

Docker Desktop verified saving and recalling a synthetic note and denied discovery with an unrelated key. Production activation checks LiteLLM and Codex tool discovery after Flux reconciliation.


Devin Review

@damacus
damacus enabled auto-merge (squash) November 25, 2026 23:45
@github-actions

Copy link
Copy Markdown
@@ spec.ingress.0.from @@
# networking.k8s.io/v1/NetworkPolicy/dev/honcho
! + one list entry added:
+ - podSelector:
+     matchLabels:
+       app.kubernetes.io/name: litellm

@@ spec.data @@
# external-secrets.io/v1/ExternalSecret/dev/litellm
! + one list entry added:
+ - remoteRef:
+     key: honcho-codex-mcp
+     property: jwt
+   secretKey: HONCHO_CODEX_JWT

@@ data @@
# v1/ConfigMap/dev/litellm-config
! + one map entry added:
+ honcho-openapi.yaml: |
+   ---
+   openapi: 3.0.3
+   info:
+     title: Honcho memory for Codex
+     version: '1.0'
+   paths:
+     /v3/workspaces/codex/conclusions:
+       post:
+         operationId: remember
+         description: Save short notes that the user has asked Codex to remember for future work.
+         requestBody:
+           required: true
+           content:
+             application/json:
+               schema:
+                 type: object
+                 required: [conclusions]
+                 additionalProperties: false
+                 properties:
+                   conclusions:
+                     type: array
+                     minItems: 1
+                     maxItems: 5
+                     items:
+                       type: object
+                       required: [content, observer_id, observed_id]
+                       additionalProperties: false
+                       properties:
+                         content:
+                           type: string
+                           minLength: 1
+                           maxLength: 4000
+                         observer_id:
+                           type: string
+                           enum: [codex]
+                         observed_id:
+                           type: string
+                           enum: [codex]
+         responses:
+           '201':
+             description: Saved notes
+     /v3/workspaces/codex/conclusions/query:
+       post:
+         operationId: recall
+         description: Search notes that Codex previously saved in the Codex workspace.
+         requestBody:
+           required: true
+           content:
+             application/json:
+               schema:
+                 type: object
+                 required: [query, filters]
+                 additionalProperties: false
+                 properties:
+                   query:
+                     type: string
+                     minLength: 1
+                     maxLength: 4000
+                   top_k:
+                     type: integer
+                     minimum: 1
+                     maximum: 10
+                   filters:
+                     type: object
+                     required: [observer, observed]
+                     additionalProperties: false
+                     properties:
+                       observer:
+                         type: string
+                         enum: [codex]
+                       observed:
+                         type: string
+                         enum: [codex]
+         responses:
+           '200':
+             description: Relevant saved notes

@@ data.config.yaml @@
# v1/ConfigMap/dev/litellm-config
! ± value change in multiline text (one insert, no deletions)
  ---
  model_list:
    - model_name: "*"
      litellm_params:
  
  [51 lines unchanged)]
  
      - prometheus
    request_timeout: 120
    num_retries: 1
  mcp_servers:
+   honcho:
+     url: http://honcho.dev.svc.cluster.local:8000
+     spec_path: /etc/litellm/honcho-openapi.yaml
+     auth_type: bearer_token
+     auth_value: os.environ/HONCHO_CODEX_JWT
+     allow_all_keys: false
    home_assistant:
      url: https://home-assistant.ironstone.casa/api/mcp
      transport: http
      auth_type: bearer_token
  
  [16 lines unchanged)]
  
    grounded_docs:
      url: http://grounded-docs.dev.svc.cluster.local:6280/mcp
      transport: http
      allow_all_keys: false

@damacus
damacus merged commit 133c56f into main Nov 25, 2026
16 of 17 checks passed
@damacus
damacus deleted the codex/feat-honcho-codex branch November 25, 2026 23:46

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Devin Review

Comment on lines +14 to +17
- secretKey: HONCHO_CODEX_JWT
remoteRef:
key: honcho-codex-mcp
property: jwt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Gateway bootstrap deadlock on missing JWT

On a fresh install without HONCHO_CODEX_JWT, the shared Secret never syncs, so LiteLLM cannot start. Honcho waits for LiteLLM, leaving no API pod to mint the missing JWT.

Learn more

External Secrets must fetch every field before it can create the gateway Secret. The LiteLLM deployment requires that Secret, and Honcho reconciliation waits for the LiteLLM Kustomization to become ready. The documented JWT minting procedure runs inside the Honcho API pod, which does not exist yet on a fresh install.

Example: An operator provisions the existing LiteLLM credentials and Honcho's signing secret, then reconciles a new cluster. They cannot mint the Codex JWT from the API pod because the gateway never starts, and Flux keeps Honcho waiting.

Recommended fix: Separate the Codex JWT from the core gateway Secret and provision it in a later reconciliation step. Verify that both services start without the JWT, Honcho calls fail closed until it is installed, and adding it reloads the gateway.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +49 to +53
application/json:
schema:
type: object
required: [query, filters]
additionalProperties: false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Missing requirements in discovered tools

LiteLLM’s build_input_schema drops the body’s required fields for remember and recall. Codex sees those fields as optional, but Honcho rejects calls that omit them.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +13 to +15
- podSelector:
matchLabels:
app.kubernetes.io/name: litellm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Missing production policy verification record

The Docker Desktop results omit the commands and do not cover production Cilium enforcement. Verification rules require recording commands and gaps.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant