Skip to content

panic at re-evaluating plan step #428

@L0ria

Description

@L0ria

When running an agent with memory enabled and github actions, LocalAGI crashes repeatable after some time with a panic:

localagi-1                 | time=2026-02-23T12:45:48.629Z level=DEBUG msg="[pickTool] Starting tool selection" tools="[create_github_pr review_github_pr comment_github_pr read_github_pr github_readme github_repository_create_or_update_content list_github_repository_files search_github_repository_files get_github_repository_content search_github_issue read_github_issue add_comment_to_github_issue close_github_issue edit_github_issue create_github_issue add_label_to_github_issue get_all_github_repository_content run_command search_memory add_memory update_state]" forceReasoning=true parallelToolExecution=false source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/tools.go source.L=371
localagi-1                 | time=2026-02-23T12:45:48.629Z level=DEBUG msg="[pickTool] Using forced reasoning approach with intention tool" forceReasoningTool=false source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/tools.go source.L=394
localagi-1                 | time=2026-02-23T12:45:48.629Z level=DEBUG msg="[pickTool] Skipping reasoning tool step, using intention tool directly" source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/tools.go source.L=439
localagi-1                 | time=2026-02-23T12:45:48.629Z level=DEBUG msg="[pickTool] Forcing tool pick via intention tool" available_tools="[create_github_pr review_github_pr comment_github_pr read_github_pr github_readme github_repository_create_or_update_content list_github_repository_files search_github_repository_files get_github_repository_content search_github_issue read_github_issue add_comment_to_github_issue close_github_issue edit_github_issue create_github_issue add_label_to_github_issue get_all_github_repository_content run_command search_memory add_memory update_state]" parallel=false source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/tools.go source.L=451
localagi-1                 | time=2026-02-23T12:45:48.629Z level=DEBUG msg="[decision] available tools for selection" tools=[pick_tool] source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/tools.go source.L=200
localagi-1                 | time=2026-02-23T12:45:52.708Z level=DEBUG msg="[decision] processed" message="Creating seccomp/AppArmor configuration files requires proper Git commit metadata. I'll need to specify a committer identity." source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/tools.go source.L=218
localagi-1                 | time=2026-02-23T12:45:52.708Z level=DEBUG msg="[pickTool] No tool picked from intention" source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/tools.go source.L=493
localagi-1                 | time=2026-02-23T12:45:52.708Z level=DEBUG msg="[toolSelection] No tool selected" reasoning="Creating seccomp/AppArmor configuration files requires proper Git commit metadata. I'll need to specify a committer identity." source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/tools.go source.L=744
localagi-1                 | time=2026-02-23T12:45:52.708Z level=DEBUG msg="Cogito reasoning callback" status="No tool selected" source.file=/work/core/agent/agent.go source.L=891
localagi-1                 | time=2026-02-23T12:46:09.395Z level=DEBUG msg="Check if goal is achieved in current conversation" reasoning="\n\n No\n\nThe goal has not been achieved because the final error prevents the file from being committed. The content with seccomp/AppArmor configurations exists in the request, but the commit fails due to missing required committer metadata (name and email). This technical hurdle remains unresolved in the provided conversation." source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/goal.go source.L=101
localagi-1                 | time=2026-02-23T12:46:11.196Z level=DEBUG msg="Subtask execution" achieved=false attempts=4 maxAttempts=4 source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/plan.go source.L=277
localagi-1                 | time=2026-02-23T12:46:11.196Z level=DEBUG msg="All attempts failed, re-evaluating plan" source.file=/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/plan.go source.L=289
localagi-1                 | panic: runtime error: invalid memory address or nil pointer dereference
localagi-1                 | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8f9883]
localagi-1                 |
localagi-1                 | goroutine 71 [running]:
localagi-1                 | github.com/mudler/cogito.ExecutePlan.func1(0x26d8852?)
localagi-1                 | 	/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/plan.go:230 +0x43
localagi-1                 | github.com/mudler/cogito.ExecutePlan({0x2329588, 0xc000495a28}, {{0xc00091a008, 0x87, 0xa1}, 0x0, 0xc000a3a320, {0x0, 0x0, 0x0}}, ...)
localagi-1                 | 	/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/plan.go:292 +0x1937
localagi-1                 | github.com/mudler/cogito.doPlan({0x2329588, 0xc000495a28}, {{0xc000480f08, 0x5, 0x5}, 0x0, 0xc000a3a320, {0x0, 0x0, 0x0}}, ...)
localagi-1                 | 	/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/tools.go:678 +0x745
localagi-1                 | github.com/mudler/cogito.ExecuteTools({0x2329588, 0xc000495a28}, {{0xc000480f08, 0x5, 0x5}, 0x0, 0xc000a3a320, {0x0, 0x0, 0x0}}, ...)
localagi-1                 | 	/go/pkg/mod/github.com/mudler/cogito@v0.9.1-0.20260216182842-e9820e6bf7b9/tools.go:865 +0x6ca
localagi-1                 | github.com/mudler/LocalAGI/core/agent.(*Agent).consumeJob(0xc000220a00, 0xc0006d60c0, {0x1cf42db, 0x6})
localagi-1                 | 	/work/core/agent/agent.go:1150 +0x18b8
localagi-1                 | github.com/mudler/LocalAGI/core/agent.(*Agent).periodicallyRun(0xc000220a00, 0xc0002a5f68?)
localagi-1                 | 	/work/core/agent/agent.go:1253 +0x36d
localagi-1                 | github.com/mudler/LocalAGI/core/agent.(*Agent).periodicalRunRunner(0xc000220a00, 0xc000300380)
localagi-1                 | 	/work/core/agent/agent.go:1334 +0x39
localagi-1                 | created by github.com/mudler/LocalAGI/core/agent.(*Agent).Run in goroutine 81
localagi-1                 | 	/work/core/agent/agent.go:1280 +0x14d
localagi-1 exited with code 2

LocalAGI is running as docker image

{
  "Id": "sha256:1c1a0063823c9e2f0765d12ae0fda9520c8b9677fc51f871346d6d451e9cca2c",
  "Digest": null,
  "RepoDigests": [],
  "Labels": {
    "com.docker.compose.project": "localagi",
    "com.docker.compose.service": "localagi",
    "com.docker.compose.version": "5.0.1",
    "org.opencontainers.image.ref.name": "ubuntu",
    "org.opencontainers.image.version": "24.04"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions