Action ruleGuard in CtrlBYou select Apply Guard ruleRule version is active
Prompt changeYour repo via MCPYour coding agent opens a pull requestAgent version is deployed
Tool or code changeYour repo via MCPYour coding agent opens a pull requestChanged tool is deployed
One finding, two fixes
Block the repeat attempt. Fix the tool.
The refund timed out, then the agent tried again. Block the repeat now; make retries safe in code.
Finding F-218Refund retried after an issue_refund timeout12 runs incl. run_1042 · frozen set refund-timeouts v3Example workflow · sample data
Action ruleApplied in CtrlB through Guard
Deny a repeat issue_refund when order_id + amount match a call in the last 10 min.
Scope
refund-agent, all sessions
Validation
Policy replay on refund-timeouts v3
Deny 12 repeat attempts
Allow 2 legitimate partial refunds
Proposed
Replayed
Rule active
Tool/code changePull request in your repo
Make retries safe: send an idempotency key, and read payment status after a timeout.
+ idempotency_key = refund:{order_id}:{amount}
+ on timeout: get_payment_status() before retry
Pass timeout, then success: one refund
Pass gateway down: retried once
Proposed
Tested
PR open
Merged
Deployed
Preview controls only. On this page they never change a real policy or repository.
Session-local ruleOne session
Block identical calls to the same tool within one session.
Argument-keyed windowAcross sessions
Match order_id + amount, across sessions for 10 min. Other arguments can differ.
The rule counts attempts. Payment telemetry shows whether the refund completed.
From proposal to production
Two paths to production.
Production findingEvidence and runs
Fix typeAction rule: policy replay and review, then Apply Guard rule as a new versionPrompt or code change: your coding agent opens a PR with tests, then your team reviews, merges and deploys
Later decisions and outcomesThe finding's trend shows what happened next and starts the next investigation
Proposal Not applied anywhere
PR open Nothing changes in production
Rule active Guard checks matching calls
Deployed Merged code is running
Validation
Same cases. Different tests.
Replay captured calls to test a rule. Run changed code to test the tool.
Frozen case set refund-timeouts v314 cases with expected outcomes. Each test adds results without changing the original evidence.Sample data
Guard rule
Replay the captured call sequence through the proposed rule. Compare decisions with the expected outcomes.
Repeat attemptsDenied: 12 of 12
Legitimate partial refundsAllowed: 2 of 2
Tool/code change
Execute baseline and changed code in a controlled environment, with payment side effects stubbed.
Timeout, then successOne refund
Gateway downRetried once
Test the fix on these cases, then check for broader improvement on a separate set: refunds-holdout.
History
Did the fix help?
The timeline marks when each fix took effect. The chart shows what followed.
Finding F-218 historySample data
Oct 20Finding F-218 opened from 12 runsHigh
Oct 24Two proposals: Guard rule and code fixProposed
Oct 26Policy replay on refund-timeouts v3Passed
Oct 27Apply Guard rule: refund.repeat-window v1, refund-agent, all sessionsEffective from hereRule active
Oct 28PR #482 "Make issue_refund idempotent" opened by your coding agentPR open
Oct 30PR #482 reviewed and mergedMerged
Oct 31Changed tool deployedEffective from hereDeployed
Repeat refund attempts per daySample data
Repeat attempts
Denied by Guard
Legitimate refunds allowed
Table view
Finding F-218: repeat refund attempts per day, sample data
Day
Repeat attempts
Denied by Guard
Legitimate refunds allowed
Oct 21
9
0
3
Oct 22
11
0
4
Oct 23
8
0
3
Oct 24
10
0
5
Oct 25
12
0
4
Oct 26
9
0
3
Oct 27 · Rule v1 active
10
10
4
Oct 28
9
9
3
Oct 29
8
8
5
Oct 30
6
6
4
Oct 31 · PR #482 deployed
2
2
3
Nov 1
1
1
4
Nov 2
1
1
4
Nov 3
0
0
3
Sample data: the rule blocks repeats from Oct 27; attempts fall after the Oct 31 deployment. The trend alone does not establish cause.
Keep the history
Pick up where the last investigation left off.
Traces and labelsEvery run, labeled
Finding historyF-218 and the runs behind it
Frozen casesrefund-timeouts v3, expected outcomes
Applied changeGuard v1 or PR #482
Outcome trendWhat happened next
Open Parquet in your S3, GCS or Azure Blob bucket. Prompts stay in your repo, with no prompt store to manage.
Action rules: choose a scope and select Apply Guard rule. Prompt and code changes go to your repository as pull requests for your team to review and deploy.
How do prompt and code changes reach my repository?
Through MCP. Your coding agent uses CtrlB's MCP tools to fetch the proposal, its finding and the frozen evidence, then opens a pull request in your repository.
What does the session-local loop rule cover?
Repeated calls to the same tool with the same arguments inside one session. It stops an agent looping on an identical call.
How does the argument-keyed time window extend that scope?
Choose a key, such as order ID and amount, and a window. The rule catches matching attempts across sessions even if other arguments differ. Payment telemetry tells you whether the original refund completed.
How do Guard replay and code evaluation differ?
Replay checks how a rule would handle captured calls. To test code, run the baseline and changed versions against the same cases in a controlled environment, with tool side effects stubbed.
Do my agents need to load prompts from a CtrlB prompt store?
No. Prompts stay in your repository and ship through your deployment. CtrlB proposes the change; your coding agent opens the pull request.