Skip to content

Consumes much more tokens than letting agent explore by itself #1129

Open

Description

@freakynit

Version

0.9.0

Platform

macOS (Apple Silicon)

Install channel

GitHub release archive / install.sh / install.ps1

Binary variant

standard

What happened, and what did you expect?

This actually consumes more tokens than letting agent explore itself. Have tested it twice earlier (around 2 months back), and tested again just now.

Coding agent harness: pi
Test repo: https://github.com/chattocorp/chatto
Query:
-- 1. Use codebase-memory-mcp and tell me how authentication works in current project
-- 2. Without using codebase-memory-mcp tell me how authentication works in current project

Results

  1. With codebase mcp: 74K input tokens
  2. Without: 43K

Reproduction

  1. Clone the repo
  2. Integrate MCP
  3. CD into the cloned repo directory
  4. Start PI agent
  5. Ask question

Logs


Diagnostics trajectory (memory / performance / leak issues)


Project scale (if relevant)

No response

Confirmations

  • I searched existing issues and this is not a duplicate.
  • My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.

Activity

  1. added
    questionFurther information is requested
    ux/behaviorDisplay bugs, docs, adoption UX
    priority/normalStandard review queue; useful PR with ordinary maintainer urgency.
    awaiting-reporterWaiting on the reporter for info/repro; stale bot will warn then close
    and removed
    bugSomething isn't working
    windowsWindows-specific issues
    on Jul 16, 2026
  2. added this to the 0.9.2-rc milestone on Jul 16, 2026
  3. github-actions commented on Jul 16, 2026

    @github-actions

    Thanks for the report! To move this forward we need a bit more so we can reproduce it ourselves:

    • the codebase-memory-mcp --version you're on
    • the exact steps or command you ran
    • a public repo (or a small dummy snippet) that shows the problem — please don't paste proprietary code

    Once that's here we'll pick it straight back up. Heads-up: issues left awaiting-reporter are automatically closed after a few weeks of silence, but a comment reopens the door anytime.

  4. DeusData commented on Jul 16, 2026

    @DeusData
    Owner

    Thanks for publishing the repository, prompt, client, and token totals. The comparison is useful, but aggregate input tokens alone do not yet isolate a server defect: the result depends on the client's tool descriptions, system prompt, model, conversation state, indexing state, tool-call count, pagination, and whether the two runs produced equivalent answers.

    Please add fresh-session transcripts for both runs with the exact pi and model versions, tool calls and responses, final answers, and token accounting split by system/context/tool input. Also confirm whether the project was already indexed before the MCP run. That will let us distinguish excessive MCP payloads from the client repeatedly invoking tools or comparing unequal answers. Marking awaiting-reporter for that controlled A/B evidence.

  5. freakynit commented on Jul 17, 2026

    @freakynit
    Author

    @DeusData Everything mentioned is open/accessible. You can do it yourself as well. I just wanted to highlight this by giving enough info for you folks to verify yourself.

    I'm personally not using it any more.

    Thanks..

  6. removed
    awaiting-reporterWaiting on the reporter for info/repro; stale bot will warn then close
    on Jul 18, 2026
  7. iyansr commented on Jul 25, 2026

    @iyansr

    Just tried on cursor and i found same issues

  8. fatih-onventis commented on Jul 28, 2026

    @fatih-onventis

    I've had a similar experience. I removed the mcp because of this.

  9. DeusData commented on Jul 28, 2026

    @DeusData
    Owner

    Thanks @iyansr and @fatih-onventis for confirming the user-visible impact across another client setup.

    Current main has substantially more compact graph-tool output than 0.9.0, including grouped search rows and blocked internal fingerprint/profile/body-token fields (src/mcp/mcp.c:3014-3025), but that does not prove these reports are fixed: model context growth can come from tool-call frequency, response size, or client reinjection behavior.

    Keeping this open as maintainer-action-pending rather than awaiting-reporter. The next useful evidence is one captured CBM tools/call response from a high-growth turn, including tool name, arguments, response bytes, and client/version. Thank you for being direct that the current experience caused removal of the MCP.

  10. diegostrg commented on Aug 4, 2026

    @diegostrg

    Hi, the same thing is happening to me. Many tokens are being consumed by the messages the MCP leaves in the conversation.

    Context Usage
    Sonnet 5
    claude-sonnet-5
    149.4k/967k tokens (15%)

    Estimated usage by category
    System prompt: 9.8k tokens (1.0%)
    System tools: 28.3k tokens (2.9%)
    MCP tools: 2k tokens (0.2%)
    Custom agents: 1.4k tokens (0.1%)
    Memory files: 2.7k tokens (0.3%)
    Skills: 3k tokens (0.3%)
    Messages: 103.3k tokens (10.7%)
    Free space: 783.4k (81.0%)
    Autocompact buffer: 33k tokens (3.4%)

    And now, in a conversation without him.

    Context Usage
    Sonnet 5
    claude-sonnet-5
    89.8k/967k tokens (9%)

    Estimated usage by category
    System prompt: 9.6k tokens (1.0%)
    System tools: 28.2k tokens (2.9%)
    Custom agents: 1.4k tokens (0.1%)
    Memory files: 1.4k tokens (0.1%)
    Skills: 3.1k tokens (0.3%)
    Messages: 48k tokens (5.0%)
    Free space: 842.5k (87.1%)
    Autocompact buffer: 33k tokens (3.4%)

    I conducted these benchmarks by asking research questions for a large project I'm working on. The only advantage the MCP offers is its incredible increase in response time (average of 52 seconds, compared to 5 minutes and 28 seconds without the MCP).

  11. iampedii commented on Sep 22, 2026

    @iampedii

    I've had the same experience and I've ran this several times.

    Experimented on Kubernetes repository

    CBM enabled Context 85% left · 54.2K used

    # Codex + Codebase Memory
    CODEX_HOME=~/.codex-cbm codex
    
    ╭──────────────────────────────────────────────────╮
    │ >_ OpenAI Codex (v0.155.1)                       │
    │                                                  │
    │ model:     gpt-5.6-sol medium   /model to change │
    │ directory: ~/projects/kubernetes-memory-demo     │
    ╰──────────────────────────────────────────────────╯
    
      Tip: Try the Desktop app. Run 'codex app' or visit https://chatgpt.com/codex?app-landing-page=true
    
    • You have 2 usage limit resets available. Run /usage to use one.
    
    
    › Can you look into Kubernetes `(*Store).Update` in `staging/src/k8s.io/apiserver/pkg/registry/
        generic/registry/store.go` and explain where it is used?
    
        I mainly want to know:
    
        * what calls this function
        * what important functions it calls
        * which Kubernetes resources depend on it
        * where `forceAllowCreate` comes from and what uses it
        * what could be affected if this function was changed
    
        Please use the repository to verify the answer and include the important file paths.
    
        Keep the answer fairly concise and don't explore unrelated parts of the codebase.
    
      use codebase memory mcp only
    
    
    ⚠ Skill descriptions were shortened to fit the skills context budget. Codex can still see every skill,
      but some descriptions are shorter. Disable unused skills or plugins to leave more room for the rest.
    
    • I’ll use the repository’s codebase-memory graph to trace Store.Update, its callers and key
      dependencies, then keep the answer focused on the resources and behavior you asked about.
    
    • Explored
      └ Read SKILL.md (codebase-memory skill)
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":".*Store.*Update.*","file_pattern":".*generic/registry/
            store.go","limit":20})
        results: 0  (cols: qn label file lines in out)
        hint: "No nodes match; check spelling or broaden the regex."
        total: 0
        returned: 0
        has_more: false
        truncated: false
    
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","limit":5})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"/Users/pedrammarandi/projects/kubernetes-memory-
            demo","name_pattern":".*Update.*","limit":5})
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","limit":5})
        results: 5  (rows: name label lines in out; group prefix "-" means empty; qn = prefix empty ?
            name : prefix + "." + name)
        Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.volume.util.operationexecutor (pkg/volume/
            util/operationexecutor/operation_executor.go):
          ActualStateOfWorldAttacherUpdater Interface 252-283 22 0
          ActualStateOfWorldMounterUpdater Interface 181-248 32 0
        Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.kubelet.pluginmanager.operationexecutor
            (p...
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"/Users/pedrammarandi/projects/kubernetes-memory-
            demo","name_pattern":".*Update.*","limit":5})
        results: 5  (rows: name label lines in out; group prefix "-" means empty; qn = prefix empty ?
            name : prefix + "." + name)
        Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.volume.util.operationexecutor (pkg/volume/
            util/operationexecutor/operation_executor.go):
          ActualStateOfWorldAttacherUpdater Interface 252-283 22 0
          ActualStateOfWorldMounterUpdater Interface 181-248 32 0
        Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.kubelet.pluginmanager.operationexecutor
            (p...
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","file_pattern":"store.go","name_pattern":"Update","limit":100,"max_output_tokens":8000})
        results_refs: 7  (cols: id prefix)
          0 Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.
          1 staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go
          2 Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.client-go.tools.cache.
          3 Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.Store.
          4 Users-pedrammarandi-projects-kubern...
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.Update","source_mode":"full","
            max_output_tokens":16000})
    
    • Calling
      └ codebase-memory-mcp.trace_path({"project":"kubernetes-memory-demo","function_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.Update","direction":"outbound"
            ,"depth":1,"limit":150,"max_output_tokens":10000})
    
    • Calling
      └ codebase-memory-mcp.trace_path({"project":"kubernetes-memory-demo","function_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.Update","direction":"inbound",
            "depth":2,"limit":150,"max_output_tokens":12000})
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.Update","source_mode":"full","
            max_output_tokens":16000})
        name: Update
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.Update
        label: Method
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/staging/src/k8s.io/apiserver/pkg/
            registry/generic/registry/store.go
        start_line: 617
        end_line: 822
        source_mode: full
        source: |
          func (e *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo,
            createValidation rest.ValidateObjectFunc...
    
    • Called
      └ codebase-memory-mcp.trace_path({"project":"kubernetes-memory-demo","function_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.Update","direction":"outbound"
            ,"depth":1,"limit":150,"max_output_tokens":10000})
        function: Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.Update
        direction: outbound
        callees_total: 40
        callees_total_relation: eq
        callees: 40  (rows: name hop; qn = group prefix empty ? name : prefix + "." + name; "" marks empty
            prefix)
        Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.kubelet.apis.config:
          DeepCopyObject 1
        Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apimachinery.pk...
    
    • Called
      └ codebase-memory-mcp.trace_path({"project":"kubernetes-memory-demo","function_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.Update","direction":"inbound",
            "depth":2,"limit":150,"max_output_tokens":12000})
        function: Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.generic.registry.Update
        direction: inbound
        callers_total: 28
        callers_total_relation: eq
        callers: 28  (cols: qn hop)
          Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.registry.apps.statefulset.storage.Update
            1
          Users-pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.policy.poddisruptionbudget.storage.Update 1
          Users-pedrammarandi-projects-kubernetes-memory-d...
    
    • The graph shows direct Update wrappers for many built in resources, plus custom resources, CRDs, and
      APIService. I’m checking the request-handler path and the forceAllowCreate source so the explanation
      distinguishes direct wrappers from the wider set of stores that inherit this method.
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":".*UpdateResource.*","file_pattern":"update.go","limit":30,"max_output_to
            kens":5000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"pkg/registry/core/pod/storage/
            storage.go","limit":20,"max_output_tokens":5000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":".*patchResource.*","file_pattern":"patch.go","limit":30,"max_output_toke
            ns":5000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":".*patcher.*","file_pattern":"patch.go","limit":30,"max_output_tokens":50
            00})
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":".*UpdateResource.*","file_pattern":"update.go","limit":30,"max_output_to
            kens":5000})
        results: 1  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.UpdateResource Function staging/src/
            k8s.io/apiserver/pkg/endpoints/handlers/update.go 51-256 4 103
        total: 1
        returned: 1
        has_more: false
        truncated: false
    
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":".*patcher.*","file_pattern":"patch.go","limit":30,"max_output_tokens":50
            00})
        results_refs: 2  (cols: id prefix)
          0 Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.
          1 staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go
        results_ref_rule: @N+suffix=prefix+suffix
        results: 9  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.admission.plugin.policy.mutating.patch.NewJSONPatcher
            Function staging/src/k8s.io/apiserver/pkg/a...
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"pkg/registry/core/pod/storage/
            storage.go","limit":20,"max_output_tokens":5000})
        results: 0  (cols: qn label file lines in out)
        hint: "No nodes match; check spelling or broaden the regex."
        total: 0
        returned: 0
        has_more: false
        truncated: false
    
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":".*patchResource.*","file_pattern":"patch.go","limit":30,"max_output_toke
            ns":5000})
        results: 2  (rows: name label lines in out; group prefix "-" means empty; qn = prefix empty ?
            name : prefix + "." + name)
        Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers (staging/src/k8s.io/apiserver/pkg/
            endpoints/handlers/patch.go):
          PatchResource Function 68-263 5 102
          patchResource Method 653-738 2 45
        total: 2
        returned: 2
        has_more: false
        truncated: false
    
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.PatchResource","source_mode":"full","
            max_output_tokens":13000})
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.UpdateResource","source_mode":"full",
            "max_output_tokens":13000})
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.patchResource","source_mode":"full","
            max_output_tokens":13000})
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.PatchResource","source_mode":"full","
            max_output_tokens":13000})
        name: PatchResource
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.PatchResource
        label: Function
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/staging/src/k8s.io/apiserver/pkg/
            endpoints/handlers/patch.go
        start_line: 68
        end_line: 263
        source_mode: full
        source: |
          func PatchResource(r rest.Patcher, scope *RequestScope, admit admission.Interface, patchTypes
            []string) http.HandlerFunc {
          	re...
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.UpdateResource","source_mode":"full",
            "max_output_tokens":13000})
        name: UpdateResource
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.UpdateResource
        label: Function
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/staging/src/k8s.io/apiserver/pkg/
            endpoints/handlers/update.go
        start_line: 51
        end_line: 256
        source_mode: full
        source: |
          func UpdateResource(r rest.Updater, scope *RequestScope, admit admission.Interface)
            http.HandlerFunc {
          	return func(w http....
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.patchResource","source_mode":"full","
            max_output_tokens":13000})
        name: patchResource
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.endpoints.handlers.patchResource
        label: Method
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/staging/src/k8s.io/apiserver/pkg/
            endpoints/handlers/patch.go
        start_line: 653
        end_line: 738
        source_mode: full
        source: |
          func (p *patcher) patchResource(ctx context.Context, scope *RequestScope) (runtime.Object, bool,
            error) {
          	p.namespace = reques...
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"pkg/registry/apps/deployment/
            storage","limit":20,"max_output_tokens":4000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"NewStorage","file_pattern":"pkg/registry/core/
            pod","limit":30,"max_output_tokens":4000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"NewREST","file_pattern":"pkg/registry/core/
            pod","limit":30,"max_output_tokens":4000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"pkg/registry/core/service/
            storage","limit":20,"max_output_tokens":4000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"pkg/registry/core/namespace/
            storage","limit":20,"max_output_tokens":4000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"pkg/registry/
            customresource","limit":20,"max_output_tokens":4000})
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"pkg/registry/apps/deployment/
            storage","limit":20,"max_output_tokens":4000})
        results_refs: 3  (cols: id prefix)
          0 Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.registry.apps.deployment.storage.
          1 pkg/registry/apps/deployment/storage/storage.go
          2 pkg/registry/apps/deployment/storage/storage_test.go
        results_ref_rule: @N+suffix=prefix+suffix
        results: 7  (cols: qn label file lines in out)
          @0+TestScaleUpdate Function @2+ 239-275 1 25
          @0+TestStatusUpdate Function @2+ 277-311 1 24
          @0+TestUpdate Function @2+ 115-146 0 9
          @0+Update Method ...
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"NewREST","file_pattern":"pkg/registry/core/
            pod","limit":30,"max_output_tokens":4000})
        results: 1  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.podtemplate.storage.NewREST Function pkg/registry/core/podtemplate/
            storage/storage.go 36-56 2 17
        total: 1
        returned: 1
        has_more: false
        truncated: false
    
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"NewStorage","file_pattern":"pkg/registry/core/
            pod","limit":30,"max_output_tokens":4000})
        results: 3  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.registry.core.pod.storage.NewStorage
            Function pkg/registry/core/pod/storage/storage.go 74-124 4 39
          Users-pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.podtemplate.storage.newStorage Function pkg/registry/core/podtemplate/
            storage/storage_test.go 34-47 6 8
          Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.registry.core.pod.storage.newStorage
            Functio...
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"pkg/registry/core/service/
            storage","limit":20,"max_output_tokens":4000})
        results_refs: 3  (cols: id prefix)
          0 Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.registry.core.service.storage.
          1 pkg/registry/core/service/storage/storage_test.go
          2 pkg/registry/core/service/storage/alloc.go
        results_ref_rule: @N+suffix=prefix+suffix
        results: 18  (cols: qn label file lines in out)
          @0+TestGenericUpdate Function @1+ 192-221 0 19
          @0+TestUpdateDryRun Function @1+ 6729-6891 0 38
          @0+TestUpdateIPsFromDualStack Function @1+ 8898-10492 0 24
          @0+...
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"pkg/registry/
            customresource","limit":20,"max_output_tokens":4000})
        results_refs: 5  (cols: id prefix)
          0 Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.
          1 staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/
          2 Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresourcedefinition.
          3 staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd_test.go
          4 staging/src/k...
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"pkg/registry/core/namespace/
            storage","limit":20,"max_output_tokens":4000})
        results_refs: 2  (cols: id prefix)
          0 Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.registry.core.namespace.storage.
          1 pkg/registry/core/namespace/storage/storage_test.go
        results_ref_rule: @N+suffix=prefix+suffix
        results: 5  (cols: qn label file lines in out)
          @0+ShouldDeleteNamespaceDuringUpdate Function pkg/registry/core/namespace/storage/storage.go
            258-265 1 5
          @0+TestUpdateDeletingNamespaceWithCompleteFinalizers Function @1+ 258-290 0 22
          @0+TestUpdateDeleti...
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.apps.deployment.storage.Update","source_mode":"full","max_output_tokens":900
            0})
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.pod.storage.NewStorage","source_mode":"full","max_output_tokens":9000})
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.service.storage.Update","source_mode":"full","max_output_tokens":9000})
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.Update","source_mode":"full","max_output_tokens":9000})
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.namespace.storage.Update","source_mode":"full","max_output_tokens":9000
            })
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.apps.deployment.storage.Update","source_mode":"full","max_output_tokens":900
            0})
        name: Update
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.apps.deployment.storage.Update
        label: Method
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/pkg/registry/apps/deployment/
            storage/storage.go
        start_line: 320
        end_line: 339
        source_mode: full
        source: |
          func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo,
            createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObject...
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.pod.storage.NewStorage","source_mode":"full","max_output_tokens":9000})
        name: NewStorage
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.pod.storage.NewStorage
        label: Function
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/pkg/registry/core/pod/storage/
            storage.go
        start_line: 74
        end_line: 124
        source_mode: full
        source: |
          func NewStorage(optsGetter generic.RESTOptionsGetter, k client.ConnectionInfoGetter,
            proxyTransport http.RoundTripper, podDisruptionBudgetClient policyclient.PodDisruptionBudge...
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.service.storage.Update","source_mode":"full","max_output_tokens":9000})
        name: Update
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.service.storage.Update
        label: Method
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/pkg/registry/core/service/storage/
            storage.go
        start_line: 193
        end_line: 197
        source_mode: full
        source: |
          func (r *StatusREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo,
            createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdat...
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.Update","source_mode":"full","max_output_tokens":9000})
        name: Update
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiextensions-apiserver.pkg.registry.customresource.Update
        label: Method
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/staging/src/k8s.io/apiextensions-
            apiserver/pkg/registry/customresource/etcd.go
        start_line: 188
        end_line: 218
        source_mode: full
        source: |
          func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo,
            createValidat...
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.namespace.storage.Update","source_mode":"full","max_output_tokens":9000
            })
        name: Update
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.namespace.storage.Update
        label: Method
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/pkg/registry/core/namespace/
            storage/storage.go
        start_line: 353
        end_line: 357
        source_mode: full
        source: |
          func (r *FinalizeREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo,
            createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjec...
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"AllowCreateOnUpdate","file_pattern":"pkg/registry/core/pod/
            strategy.go","limit":10,"max_output_tokens":3000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"AllowCreateOnUpdate","file_pattern":"staging/src/k8s.io/apiextensions-
            apiserver/pkg/registry/customresource/strategy.go","limit":10,"max_output_tokens":3000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Updater","file_pattern":"staging/src/k8s.io/apiserver/pkg/registry/rest/
            rest.go","limit":10,"max_output_tokens":3000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Patcher","file_pattern":"staging/src/k8s.io/apiserver/pkg/registry/rest/
            rest.go","limit":10,"max_output_tokens":3000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Store","file_pattern":"staging/src/k8s.io/apiextensions-apiserver/pkg/
            registry/customresource/etcd.go","limit":20,"max_output_tokens":3000})
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"AllowCreateOnUpdate","file_pattern":"pkg/registry/core/pod/
            strategy.go","limit":10,"max_output_tokens":3000})
        results: 1  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-demo.pkg.registry.core.pod.AllowCreateOnUpdate
            Method pkg/registry/core/pod/strategy.go 136-138 0 1
        total: 1
        returned: 1
        has_more: false
        truncated: false
    
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"AllowCreateOnUpdate","file_pattern":"staging/src/k8s.io/apiextensions-
            apiserver/pkg/registry/customresource/strategy.go","limit":10,"max_output_tokens":3000})
        results: 1  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.AllowCreateOnUpdate Method staging/src/k8s.io/
            apiextensions-apiserver/pkg/registry/customresource/strategy.go 264-266 0 1
        total: 1
        returned: 1
        has_more: false
        truncated: false
    
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Updater","file_pattern":"staging/src/k8s.io/apiserver/pkg/registry/rest/
            rest.go","limit":10,"max_output_tokens":3000})
        results: 4  (rows: name label lines in out; group prefix "-" means empty; qn = prefix empty ?
            name : prefix + "." + name)
        Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiserver.pkg.registry.rest
            (staging/src/k8s.io/apiserver/pkg/registry/rest/rest.go):
          CreateUpdateResetFieldsStrategy Interface 399-402 1 0
          CreaterUpdater Interface 277-280 131 0
          UpdateResetFieldsStrategy Interface 406-409 1 0
          Updater Interface 264-273 63 0
        total: 4
        returned: 4
        ha...
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Patcher","file_pattern":"staging/src/k8s.io/apiserver/pkg/registry/rest/
            rest.go","limit":10,"max_output_tokens":3000})
        results: 1  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiserver.pkg.registry.rest.Patcher Interface staging/src/k8s.io/
            apiserver/pkg/registry/rest/rest.go 286-289 15 0
        total: 1
        returned: 1
        has_more: false
        truncated: false
    
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Store","file_pattern":"staging/src/k8s.io/apiextensions-apiserver/pkg/
            registry/customresource/etcd.go","limit":20,"max_output_tokens":3000})
        results: 2  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.StatusREST.store Field staging/src/k8s.io/apiextensions-
            apiserver/pkg/registry/customresource/etcd.go 119-119 0 0
          Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.ScaleREST.store Field staging/src/k8s.io/apiextensions-
            apiserver/pkg/re...
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"NewStorage","file_pattern":"staging/src/k8s.io/apiextensions-apiserver/
            pkg/registry/customresource/etcd.go","limit":10,"max_output_tokens":3000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"staging/src/k8s.io/kube-aggregator/pkg/registry/
            apiservice/etcd/etcd.go","limit":10,"max_output_tokens":3000})
    
    • Calling
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"NewREST","file_pattern":"staging/src/k8s.io/apiextensions-apiserver/pkg/
            registry/customresourcedefinition/etcd.go","limit":10,"max_output_tokens":3000})
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"NewStorage","file_pattern":"staging/src/k8s.io/apiextensions-apiserver/
            pkg/registry/customresource/etcd.go","limit":10,"max_output_tokens":3000})
        results: 1  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.NewStorage Function staging/src/k8s.io/apiextensions-
            apiserver/pkg/registry/customresource/etcd.go 44-101 2 28
        total: 1
        returned: 1
        has_more: false
        truncated: false
    
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"Update","file_pattern":"staging/src/k8s.io/kube-aggregator/pkg/registry/
            apiservice/etcd/etcd.go","limit":10,"max_output_tokens":3000})
        results: 1  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.kube-
            aggregator.pkg.registry.apiservice.etcd.Update Method staging/src/k8s.io/kube-aggregator/pkg/
            registry/apiservice/etcd/etcd.go 163-167 0 9
        total: 1
        returned: 1
        has_more: false
        truncated: false
    
    
    • Called
      └ codebase-memory-mcp.search_graph({"project":"kubernetes-memory-
            demo","name_pattern":"NewREST","file_pattern":"staging/src/k8s.io/apiextensions-apiserver/pkg/
            registry/customresourcedefinition/etcd.go","limit":10,"max_output_tokens":3000})
        results: 1  (cols: qn label file lines in out)
          Users-pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresourcedefinition.NewREST Function staging/src/k8s.io/
            apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go 42-65 1 18
        total: 1
        returned: 1
        has_more: false
        truncated: false
    
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.pod.AllowCreateOnUpdate","source_mode":"full","max_output_tokens":6000}
            )
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.AllowCreateOnUpdate","source_mode":"full","max_output_to
            kens":6000})
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.NewStorage","source_mode":"full","max_output_tokens":600
            0})
    
    • Calling
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresourcedefinition.NewREST","source_mode":"full","max_output_toke
            ns":6000})
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.pod.AllowCreateOnUpdate","source_mode":"full","max_output_tokens":6000}
            )
        name: AllowCreateOnUpdate
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.pkg.registry.core.pod.AllowCreateOnUpdate
        label: Method
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/pkg/registry/core/pod/strategy.go
        start_line: 136
        end_line: 138
        source_mode: full
        source: |
          func (podStrategy) AllowCreateOnUpdate() bool {
          	return false
          }
        callers: 0
        callees: 0
    
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.AllowCreateOnUpdate","source_mode":"full","max_output_to
            kens":6000})
        name: AllowCreateOnUpdate
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.AllowCreateOnUpdate
        label: Method
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/staging/src/k8s.io/apiextensions-
            apiserver/pkg/registry/customresource/strategy.go
        start_line: 264
        end_line: 266
        source_mode: full
        source: |
          func (customResourceStrategy) AllowCreateOnUpdate() bool {
          	return false
         ...
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresource.NewStorage","source_mode":"full","max_output_tokens":600
            0})
        name: NewStorage
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiextensions-apiserver.pkg.registry.customresource.NewStorage
        label: Function
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/staging/src/k8s.io/apiextensions-
            apiserver/pkg/registry/customresource/etcd.go
        start_line: 44
        end_line: 101
        source_mode: full
        source: |
          func NewStorage(resource schema.GroupResource, singularResource schema.GroupResource, kind,
            listK...
    
    • Called
      └ codebase-memory-mcp.get_code_snippet({"project":"kubernetes-memory-demo","qualified_name":"Users-
            pedrammarandi-projects-kubernetes-memory-demo.staging.src.k8s.io.apiextensions-
            apiserver.pkg.registry.customresourcedefinition.NewREST","source_mode":"full","max_output_toke
            ns":6000})
        name: NewREST
        qualified_name: Users-pedrammarandi-projects-kubernetes-memory-
            demo.staging.src.k8s.io.apiextensions-apiserver.pkg.registry.customresourcedefinition.NewREST
        label: Function
        file_path: /Users/pedrammarandi/projects/kubernetes-memory-demo/staging/src/k8s.io/apiextensions-
            apiserver/pkg/registry/customresourcedefinition/etcd.go
        start_line: 42
        end_line: 65
        source_mode: full
        source: |
          func NewREST(scheme *runtime.Scheme, optsGetter generic.RESTOptionsGetter) (*REST, e...
    
    • (*Store).Update (staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go:617) is the
      shared storage implementation for updating many API objects.
    
      - What calls it: The HTTP PUT handler calls rest.Updater.Update with forceAllowCreate=false in
        staging/src/k8s.io/apiserver/pkg/endpoints/handlers/update.go:214. The PATCH handler calls it
        through rest.Patcher.Update in staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go:704. A
        resource REST type can expose Store.Update through its embedded store, as Pod storage (pkg/
        registry/core/pod/storage/storage.go:74) does, or call it from a wrapper such as Service status
        (pkg/registry/core/service/storage/storage.go:193) and Deployment scale (pkg/registry/apps/
        deployment/storage/storage.go:320).
    
      - Important calls inside it: Storage.GuaranteedUpdate performs the storage operation and supplies
        the existing object. The callback uses UpdatedObject, checks resource versions, then runs
        rest.BeforeCreate or rest.BeforeUpdate and the corresponding validation. It also handles TTL, dry
        run, managed-field timestamp changes, and deletion when finalizers are cleared. Successful writes
        run the configured after-create or after-update hook. See staging/src/k8s.io/apiserver/pkg/
        registry/generic/registry/store.go:640.
    
      - Resources that depend on it: Verified examples include Pods and their updateable subresources
        (pkg/registry/core/pod/storage/storage.go:74), Services (pkg/registry/core/service/storage/
        storage.go:193), Deployments (pkg/registry/apps/deployment/storage/storage.go:320), custom
        resources (staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd.go:44), and
        CRDs (staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/
        etcd.go:42). The graph also finds direct wrappers for resources including StatefulSets, Jobs,
        Namespaces, PVCs, Ingresses, and HPAs. These examples are not an exhaustive resource list.
    
      - forceAllowCreate: PUT supplies false. In the PATCH handler (staging/src/k8s.io/apiserver/pkg/
        endpoints/handlers/patch.go:653), YAML and CBOR server-side apply set it to true; other patch
        types leave it false. Store.Update combines it with UpdateStrategy.AllowCreateOnUpdate() to allow
        a missing object through GuaranteedUpdate, then takes the create path. Some subresource wrappers
        explicitly pass false, including Service status (pkg/registry/core/service/storage/
        storage.go:193).
    
      A change here could affect PUT, PATCH, and server-side apply across those resources: whether missing
      objects can be created, conflict detection, admission and validation, finalizer-driven deletion, dry
      runs, and the object returned to clients. The exact effect depends on each resource’s strategy and
      hooks.
    
      Worked for 1m 31s · done 12:23 PM
     
     
    › Ask Codex to do anything
     
      Context 85% left · 54.2K used
    

    CMB Disabled Context 84% left · 48.3K used · 273K in · 3.13K out

    # Vanilla Codex
    CODEX_HOME=~/.codex-baseline codex
    
    ╭──────────────────────────────────────────────────╮
    │ >_ OpenAI Codex (v0.155.1)                       │
    │                                                  │
    │ model:     gpt-5.6-sol medium   /model to change │
    │ directory: ~/projects/kubernetes-memory-demo     │
    ╰──────────────────────────────────────────────────╯
    
      Tip: Try the Desktop app. Run 'codex app' or visit https://chatgpt.com/codex?app-landing-page=true
    
    • You have 2 usage limit resets available. Run /usage to use one.
    
    
    › Can you look into Kubernetes `(*Store).Update` in `staging/src/k8s.io/apiserver/pkg/registry/
        generic/registry/store.go` and explain where it is used?
    
        I mainly want to know:
    
        * what calls this function
        * what important functions it calls
        * which Kubernetes resources depend on it
        * where `forceAllowCreate` comes from and what uses it
        * what could be affected if this function was changed
    
        Please use the repository to verify the answer and include the important file paths.
    
        Keep the answer fairly concise and don't explore unrelated parts of the codebase.
    
    
    ⚠ Skill descriptions were shortened to fit the skills context budget. Codex can still see every skill,
      but some descriptions are shorter. Disable unused skills or plugins to leave more room for the rest.
    
    • I’ll trace Store.Update through its callers and the registry setup in this checkout, then summarize
      the resource and forceAllowCreate paths with file references.
    
    • Explored
      └ Read SKILL.md (codebase-memory skill)
    
    • Ran pwd; rg --files -g 'AGENTS.md' -g 'store.go' -g '*update*' staging/src/k8s.io/apiserver/pkg/
      │ registry/generic/registry .agents 2>/dev/null | head -80
      └ /Users/pedrammarandi/projects/kubernetes-memory-demo
        staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go
    
    • Ran git status --short; rg -n 'func \(.*\*Store\) Update\(|forceAllowCreate|\.Update\(' staging/src/
      │ k8s.io/apiserver/pkg/registry/generic/registry/store.go
      └ ?? .codebase-memory/
        617:func (e *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo,
        … +2 lines (ctrl + t to view transcript)
        638:    ignoreNotFound := e.UpdateStrategy.AllowCreateOnUpdate() || forceAllowCreate
        647:            if !e.UpdateStrategy.AllowCreateOnUpdate() && !forceAllowCreate {
    
    • I’m using the codebase graph for a quick call trace, then checking the actual source at each
      important edge.
    
    • Explored
      └ Read store.go
        Search func \(.*\) Update\(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo|
               \.Store\.Update\(|Store\.Update\( in pkg
        Search forceAllowCreate|AllowCreateOnUpdate\( in apiserver
        Read store.go
        Search forceAllowCreate|forceAllowCreateOnUpdate in handlers
        Search genericregistry.Store|generic.Store|registry.Store|Store: \*store|Store: store|Store: \* in
               storage.go
        Search UpdatedObjectInfo|\.Update\(.*forceAllowCreate|\.Update\(.*allowCreate|\.Update\(.*true|
               \.Update\(.*false in update.go
        Read update.go, patch.go, storage.go, etcd.go
        Read rest.go
        Search handlers.UpdateResource|handlers.PatchResource|UpdateResource\(|PatchResource\( in
        installer.go
        Search genericregistry\.Store\{ in registry
        Search return .*\.Update\(ctx|:= .*\.Update\(ctx|\.Store\.Update\(ctx in registry
    
    • The main path is HTTP PUT and PATCH through the REST updater interface. The same store is embedded
      in many resource handlers, with explicit wrappers for status and scale subresources. I’m checking
      the create-on-update conditions and representative wrappers now.
    
    • Explored
      └ Read storage.go, etcd.go
        Search genericregistry\.Store\{ in registry
        Read installer.go
        Read storage.go
        Search AllowCreateOnUpdate in strategy.go
        Search func \(.*\) AllowCreateOnUpdate\( in registry
        Search AllowCreateOnUpdate\(\) bool|AllowCreateOnUpdate\(\).*true|AllowCreateOnUpdate\(\).*false
        in
               service
        Read strategy.go, update.go
        Search func \(.*\) Update\(|\.store.Update\( in storage.go
        Search func BeforeUpdate|func BeforeCreate in rest
        Search func \(.*\) GuaranteedUpdate|GuaranteedUpdate\( in interfaces.go
        Search func \(.*\) UpdatedObject\( in rest
    
    • (*Store).Update (staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go:617) is the
      shared persistence path for updates to resources backed by the generic registry store.
    
      - Callers: The API server’s PUT and PATCH routes pass through rest.Updater (staging/src/k8s.io/
        apiserver/pkg/registry/rest/rest.go:263). The PUT handler (staging/src/k8s.io/apiserver/pkg/
        endpoints/handlers/update.go:207) calls Update directly through that interface; the PATCH handler
        (staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go:704) does so after constructing the
        patched object. Resource REST types reach the method by embedding Store or forwarding to it. Some
        internal paths call it directly, including Pod eviction (pkg/registry/core/pod/storage/
        eviction.go:355).
    
      - Important work it calls: Storage.GuaranteedUpdate (staging/src/k8s.io/apiserver/pkg/registry/
        generic/registry/store.go:641) performs the atomic storage operation. Its callback obtains the
        proposed object via objInfo.UpdatedObject, checks resource versions, runs resource strategy
        preparation and validation through rest.BeforeUpdate (or rest.BeforeCreate), and runs admission
        validation. It also handles TTL, hooks, dry runs, and deletion when an update removes the last
        finalizer.
    
      - Resources: This is broad shared code. Verified examples include Pods and their status, ephemeral-
        containers, and resize subresources (pkg/registry/core/pod/storage/storage.go:76), Deployments and
        status/scale (pkg/registry/apps/deployment/storage/storage.go:89), Services (pkg/registry/core/
        service/storage/storage.go:193), and custom resources and their status/scale (staging/src/k8s.io/
        apiextensions-apiserver/pkg/registry/customresource/etcd.go:46).
    
      - forceAllowCreate: It is a caller-supplied argument. Normal PUT passes false (staging/src/k8s.io/
        apiserver/pkg/endpoints/handlers/update.go:211); server-side apply PATCH sets it to true (staging/
        src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go:668). Store.Update combines it with the
        resource strategy’s AllowCreateOnUpdate() to permit creation when the named object is missing. For
        example, Services allow create on update (pkg/registry/core/service/strategy.go:104), while
        Deployments do not (pkg/registry/apps/deployment/strategy.go:105). Deployment status (pkg/
        registry/apps/deployment/storage/storage.go:156) explicitly passes false to prevent subresource
        creation.
    
      A change here could therefore alter update and apply behavior across those resources: conflict
      detection, validation or admission, create-on-update, finalizer deletion, dry-run results, and what
      is persisted or returned. Resource-specific strategies and wrappers can narrow the effect, so the
      impact depends on the branch changed.
    
      Worked for 1m 8s · done 12:22 PM
     
     
    › Ask Codex to do anything
     
      Context 84% left · 48.3K used · 273K in · 3.13K out
    
  12. DeusData commented on Oct 19, 2026

    @DeusData
    Owner

    Thank you for the additional Kubernetes comparison and the timing/context measurements across clients. These reports still show a user-visible cost, even where response time improved. I have no controlled comparison or resolution to add; smaller payloads alone do not settle total conversation growth.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/normalStandard review queue; useful PR with ordinary maintainer urgency.questionFurther information is requestedux/behaviorDisplay bugs, docs, adoption UX

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions