Filed from the agent-kit council integration review (read-only research council, 2026-07-03) — these repos are tightly coupled with agent-kit's fanout/supervise runner and knowledge loop.
1. Headless jobs launched but never durably reconciled
StartHeadlessJobCommandHandler.kt starts a gateway job + saves a RUNNING WorkspaceAgentSession, but pollHeadlessJob (AgentGatewayClient.kt) has no production caller. Gateway state is in-memory and output /tmp-backed (agent-runtime HeadlessJobManager.kt). Council/headless runs have no durable status/output source of truth.
Action: durable headless-run table + poll/reconcile worker + persisted output refs; drive terminal session status from it.
2. Headless job id stored as gatewayAgentId, idle checks hit the interactive endpoint
Stored in gatewayAgentId (StartHeadlessJobCommandHandler.kt); IdleScaleDownScheduler.kt → gateway.agentIdle → /agents/{id} (interactive-only). Headless state is at /agents/headless/{id} (HeadlessController.kt).
Action: split interactiveGatewayAgentId from headlessJobId; branch idle/recycle by runMode.
3. Scope loss through the knowledge RAG adapter
KnowledgeMcpTransport.kt recall passes only query/limit/mode, dropping scope — no project/task-scoped recall. agent-kit's council now calls the knowledge MCP directly for scope control; agents-api's RAG should forward scope.
Filed from the agent-kit council integration review (read-only research council, 2026-07-03) — these repos are tightly coupled with agent-kit's fanout/supervise runner and knowledge loop.
1. Headless jobs launched but never durably reconciled
StartHeadlessJobCommandHandler.ktstarts a gateway job + saves aRUNNINGWorkspaceAgentSession, butpollHeadlessJob(AgentGatewayClient.kt) has no production caller. Gateway state is in-memory and output/tmp-backed (agent-runtime HeadlessJobManager.kt). Council/headless runs have no durable status/output source of truth.Action: durable headless-run table + poll/reconcile worker + persisted output refs; drive terminal session status from it.
2. Headless job id stored as
gatewayAgentId, idle checks hit the interactive endpointStored in
gatewayAgentId(StartHeadlessJobCommandHandler.kt);IdleScaleDownScheduler.kt→gateway.agentIdle→/agents/{id}(interactive-only). Headless state is at/agents/headless/{id}(HeadlessController.kt).Action: split
interactiveGatewayAgentIdfromheadlessJobId; branch idle/recycle byrunMode.3. Scope loss through the knowledge RAG adapter
KnowledgeMcpTransport.ktrecall passes onlyquery/limit/mode, droppingscope— no project/task-scoped recall. agent-kit's council now calls the knowledge MCP directly for scope control; agents-api's RAG should forwardscope.