fix(handler): attribute agent CLI actions to agent identity
When agents use the multica CLI during task execution, their comments, issue updates, and issue creations were attributed to the daemon's user (via JWT) instead of the agent. Pass MULTICA_AGENT_ID env var from the daemon, send X-Agent-ID header from the CLI client, and use it in handlers to set the correct author/actor identity.
This commit is contained in:
parent
663dec52b8
commit
a4c8bbb03c
5 changed files with 52 additions and 10 deletions
|
|
@ -662,6 +662,7 @@ func (d *Daemon) runTask(ctx context.Context, task Task, provider string) (TaskR
|
|||
"MULTICA_DAEMON_PORT": fmt.Sprintf("%d", d.cfg.HealthPort),
|
||||
"MULTICA_WORKSPACE_ID": d.workspaceIDForRuntime(task.RuntimeID),
|
||||
"MULTICA_AGENT_NAME": agentName,
|
||||
"MULTICA_AGENT_ID": task.AgentID,
|
||||
"MULTICA_TASK_ID": task.ID,
|
||||
}
|
||||
// Point Codex to the per-task CODEX_HOME so it discovers skills natively
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue