Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/normalize-codex-risk-targets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@windyroad/risk-scorer": patch
---

Recognize relative Codex completion targets for canonically named risk agents.
3 changes: 2 additions & 1 deletion packages/risk-scorer/hooks/codex-agent-completion.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ function diagnoseSubagentStop(input, outcome, reason) {
}

function statePath(input, target, suffix = "") {
return join(riskDir(input.session_id), `codex-agent-${Buffer.from(target).toString("base64url")}${suffix}`);
const normalized = target.startsWith("/root/") ? target.slice("/root/".length) : target;
return join(riskDir(input.session_id), `codex-agent-${Buffer.from(normalized).toString("base64url")}${suffix}`);
}

function clearTarget(input, target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ current_pipeline_close_input() {

direct_pipeline_interrupt_input() {
printf '{"session_id":"%s","cwd":"%s","tool_name":"interrupt_agent","tool_input":{"target":"%s"},"tool_response":{"previous_status":{"completed":"RISK_SCORES: commit=4 push=4 release=4\\nRISK_CWD: %s"}}}' \
"$SESSION" "$OTHER_REPO" "$TARGET" "$PIPELINE_REPO"
"$SESSION" "$OTHER_REPO" "${TARGET#/root/}" "$PIPELINE_REPO"
}

current_empty_wait_input() {
Expand Down