Skip to content

Agent Kernel Lifecycle Structuring #11649

@HyeockJinKim

Description

@HyeockJinKim

Structure Agent kernel lifecycle (create/prepare/terminate) into state-machine-based handlers, mirroring the sokovan Coordinator pattern, and guarantee event delivery to the Manager at each stage transition.

Background: create_kernel() is a single monolithic function handling image pull → resource allocation → container creation → kernel init in hundreds of lines. Files under agent/stage/kernel_lifecycle/docker/ exist per stage but are not wired into a state machine. Task tracking is minimal (CreateTaskInfo holds only kernel_id and session_id). Agent CLAUDE.md states container state transitions MUST go through agent/stage/, but this is currently unimplemented.

JIRA Issue: BA-6074

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Epic.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions