Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
feat(ai): enforce look-before-asking — refuse first-action elicitations in the agentic loop
rcourtman952fccf8df91
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.mdindex 0c65a504f5..742d4b34a0 100644--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md@@ -5198,7 +5198,21 @@ question call returns a non-interactive error without emitting awaiting event and sibling tool calls from the same provider turn keepprocessing; approval waits never block (they queue), and thetool-only-turn wrap-up guardrail is interactive-profile-owned rather-than keyed on autonomy. The system prompt describes detection and+than keyed on autonomy. Interactive runs additionally enforce a+look-before-asking gate: a `pulse_question` issued before the run has+attempted any real tool call is refused with an error tool result that+steers the model to read-only enumeration (the resolve-before-asking+prompt policy made enforceable — small local models otherwise open+natural first questions like "any alerts?" with a "which resource?"+elicitation whose answer is derivable from enumeration). The refusal+emits no question card or clarify event, sibling tool calls from the+same provider turn keep processing rather than tripping the+interactive-call-set skip path, any queued tool attempt (success or+error) satisfies the gate for the rest of the run, and the gate fails+open after `maxLookGateBlocks` refusals so a genuinely unanswerable+prompt cannot livelock. The stream-boundary promise — a natural first+question produces an answer, never a clarification card — is pinned in+the interaction scenario corpus. The system prompt describes detection andinvestigation modes directly instead of claiming controlled orautonomous execution. Non-interactive operation grants no mutationauthority. The profile vocabulary is closed: unknown profile values arediff --git a/internal/ai/chat/agentic.go b/internal/ai/chat/agentic.goindex 944442e538..c08abc2b38 100644--- a/internal/ai/chat/agentic.go+++ b/internal/ai/chat/agentic.go@@ -739,6 +739,16 @@ func (a *AgenticLoop) ExecuteWithTools(ctx context.Context, sessionID string, mereturn a.executeWithTools(ctx, sessionID, messages, tools, callback)}+// maxLookGateBlocks bounds the look-before-asking gate: the+// resolve-before-asking policy lives in the system prompt, but small local+// models ignore it and reach for pulse_question as their first action+// ("which resource do you mean?") when the answer is derivable from+// read-only enumeration. Until the model has attempted at least one real+// tool call in the run, the gate refuses the elicitation with a steer back+// to the tools. It fails open after this many refusals so a model with a+// genuinely unanswerable prompt cannot livelock against the gate.+const maxLookGateBlocks = 2+// cost-recording-exempt: orchestrator (chat.Service or patrol caller)// records cost from the loop's GetTotal{Input,Output}Tokens after this// returns. See ExecuteWithTools above.@@ -785,6 +795,10 @@ func (a *AgenticLoop) executeWithTools(ctx context.Context, sessionID string, meconst maxIdenticalCalls = 3recentCallCounts := make(map[string]int)+ // Look-before-asking gate state; see maxLookGateBlocks.+ lookGateToolAttempted := false+ lookGateBlocks := 0+// Track where each turn's messages begin in providerMessages for compaction.// We keep the last N turns' tool results in full; older ones get compacted.const compactionKeepTurns = 2 // Keep last 2 turns' tool results in full (KA preserves key facts)@@ -1537,6 +1551,52 @@ func (a *AgenticLoop) executeWithTools(ctx context.Context, sessionID string, me}}+ // Look-before-asking gate (interactive profiles; non-interactive+ // question calls were already answered above). A pulse_question+ // issued before any real tool attempt is refused with an error+ // result — the model keeps its sibling tool calls and is steered+ // to enumerate instead of elicit. No stream event is emitted:+ // pulse_question renders as a question card only when it actually+ // waits for the user, and a refused elicitation should be+ // invisible except as the tool attempt that follows it.+ if !lookGateToolAttempted && lookGateBlocks < maxLookGateBlocks {+ remaining := toolCalls[:0]+ blockedQuestions := 0+ for _, tc := range toolCalls {+ if tc.Name != pulseQuestionToolName {+ remaining = append(remaining, tc)+ continue+ }+ blockedQuestions+++ log.Warn().+ Str("id", tc.ID).+ Str("session_id", sessionID).+ Int("gate_blocks", lookGateBlocks+1).+ Msg("[AgenticLoop] Blocked first-action pulse_question (look-before-asking gate)")+ projection := newProviderToolResultContextProjection(tc.ID,+ "BLOCKED: you have not attempted a single tool call yet, so asking the user is premature. Do not ask the operator for information Pulse can enumerate — resource names, IDs, alert lists, and statuses are all discoverable with read-only tools. Look first: pulse_summarize {\"action\":\"fleet\"} answers \"how is my infrastructure doing?\" with no parameters, and the query/alert tools list resources and active alerts. Ask a question only if genuine ambiguity remains after looking.", true)+ resultMessages = append(resultMessages, Message{+ ID: uuid.New().String(),+ Role: "user",+ Timestamp: time.Now(),+ ToolResult: &projection.Transcript,+ })+ providerMessages = append(providerMessages, providers.Message{+ Role: "user",+ ToolResult: &projection.Model,+ })+ }+ if blockedQuestions > 0 {+ lookGateBlocks+++ toolCalls = remaining+ if len(toolCalls) == 0 {+ currentTurnStartIndex = len(providerMessages)+ turn+++ continue+ }+ }+ }+// pulse_question is interactive and must not run in parallel with other tools.// If the provider emits multiple tool calls alongside pulse_question, skip the// others and let the model retry after receiving the user's answer.@@ -1821,6 +1881,8 @@ func (a *AgenticLoop) executeWithTools(ctx context.Context, sessionID string, me// Tool passed all pre-checks — queue for executionpendingExec = append(pendingExec, pendingToolExec{tc: tc, toolKind: toolKind})+ // A real tool attempt satisfies the look-before-asking gate.+ lookGateToolAttempted = true}// --- Phase 2: Execute pending tools ---diff --git a/internal/ai/chat/agentic_look_gate_test.go b/internal/ai/chat/agentic_look_gate_test.gonew file mode 100644index 0000000000..7caaec262e--- /dev/null+++ b/internal/ai/chat/agentic_look_gate_test.go@@ -0,0 +1,244 @@+package chat++// Tests for the look-before-asking gate: pulse_question issued before any+// tool attempt in a run is refused with a steer back to read-only tools,+// sibling tool calls in the same provider turn still execute, and the gate+// fails open after maxLookGateBlocks refusals so an unanswerable prompt+// cannot livelock. The user-visible promise (a natural first question gets+// an answer, never a clarification card) is pinned at the stream boundary+// in interaction_scenario_corpus_test.go.++import (+ "context"+ "encoding/json"+ "strings"+ "sync"+ "testing"+ "time"++ "github.com/rcourtman/pulse-go-rewrite/internal/ai/providers"+ "github.com/rcourtman/pulse-go-rewrite/internal/ai/tools"+ "github.com/stretchr/testify/assert"+ "github.com/stretchr/testify/require"+)++func lookGateQuestionInput() map[string]interface{} {+ return map[string]interface{}{+ "questions": []interface{}{+ map[string]interface{}{+ "id": "q1", "type": "select",+ "question": "Which resource do you want to check?",+ "options": []interface{}{map[string]interface{}{"label": "Fleet", "value": "fleet"}},+ },+ },+ }+}++// TestAgenticLoop_LookGateRefusesFirstActionQuestion drives the observed+// small-model failure: the model's first action is an elicitation whose+// answer is derivable from enumeration. The gate must refuse it (no+// question card), and the run must continue to a tool-backed answer.+func TestAgenticLoop_LookGateRefusesFirstActionQuestion(t *testing.T) {+ turn := 0+ provider := &stubStreamingProvider{}+ provider.chatStream = func(ctx context.Context, req providers.ChatRequest, callback providers.StreamCallback) error {+ turn+++ switch turn {+ case 1:+ callback(providers.StreamEvent{Type: "done", Data: providers.DoneEvent{+ ToolCalls: []providers.ToolCall{+ {ID: "q-1", Name: pulseQuestionToolName, Input: lookGateQuestionInput()},+ },+ }})+ case 2:+ callback(providers.StreamEvent{Type: "done", Data: providers.DoneEvent{+ ToolCalls: []providers.ToolCall{+ {ID: "r-1", Name: "pulse_query", Input: map[string]interface{}{"action": "health"}},+ },+ }})+ default:+ callback(providers.StreamEvent{Type: "content", Data: providers.ContentEvent{Text: "No active alerts."}})+ callback(providers.StreamEvent{Type: "done", Data: providers.DoneEvent{}})+ }+ return nil+ }++ exec := tools.NewPulseToolExecutor(tools.ExecutorConfig{+ StateProvider: &mockStateProvider{},+ AgentServer: &mockAgentServer{},+ })+ loop := NewAgenticLoop(provider, exec, "base prompt")++ var questionEvents int+ messages, err := loop.ExecuteWithTools(+ context.Background(),+ "look-gate-session",+ []Message{{Role: "user", Content: "are there any alerts I should look at?"}},+ nil,+ func(event StreamEvent) {+ if event.Type == "question" {+ questionEvents+++ }+ },+ )+ require.NoError(t, err)+ require.Zero(t, questionEvents, "a refused elicitation must not emit a question card")++ var blockedSeen, querySeen, finalSeen bool+ for _, msg := range messages {+ if msg.ToolResult != nil {+ switch msg.ToolResult.ToolUseID {+ case "q-1":+ blockedSeen = true+ require.True(t, msg.ToolResult.IsError, "gate refusal must be an error result")+ require.Contains(t, msg.ToolResult.Content, "BLOCKED")+ require.Contains(t, msg.ToolResult.Content, "pulse_summarize")+ case "r-1":+ querySeen = true+ assert.NotContains(t, msg.ToolResult.Content, "SKIPPED")+ }+ }+ if msg.Role == "assistant" && strings.Contains(msg.Content, "No active alerts.") {+ finalSeen = true+ }+ }+ require.True(t, blockedSeen, "blocked question must persist a paired error result")+ require.True(t, querySeen, "the follow-up tool attempt must execute")+ require.True(t, finalSeen, "the run must end in an answer")+}++// TestAgenticLoop_LookGateKeepsSiblingToolCalls pins that a refused+// question does not trip the interactive-set path that skips sibling+// tools: a first turn pairing a question with a read call still executes+// the read.+func TestAgenticLoop_LookGateKeepsSiblingToolCalls(t *testing.T) {+ turn := 0+ provider := &stubStreamingProvider{}+ provider.chatStream = func(ctx context.Context, req providers.ChatRequest, callback providers.StreamCallback) error {+ turn+++ switch turn {+ case 1:+ callback(providers.StreamEvent{Type: "done", Data: providers.DoneEvent{+ ToolCalls: []providers.ToolCall{+ {ID: "q-1", Name: pulseQuestionToolName, Input: lookGateQuestionInput()},+ {ID: "r-1", Name: "pulse_query", Input: map[string]interface{}{"action": "health"}},+ },+ }})+ default:+ callback(providers.StreamEvent{Type: "content", Data: providers.ContentEvent{Text: "done"}})+ callback(providers.StreamEvent{Type: "done", Data: providers.DoneEvent{}})+ }+ return nil+ }++ exec := tools.NewPulseToolExecutor(tools.ExecutorConfig{+ StateProvider: &mockStateProvider{},+ AgentServer: &mockAgentServer{},+ })+ loop := NewAgenticLoop(provider, exec, "base prompt")++ messages, err := loop.ExecuteWithTools(+ context.Background(),+ "look-gate-sibling-session",+ []Message{{Role: "user", Content: "how is my machine doing?"}},+ nil,+ func(StreamEvent) {},+ )+ require.NoError(t, err)++ var blockedSeen, queryExecuted bool+ for _, msg := range messages {+ if msg.ToolResult == nil {+ continue+ }+ switch msg.ToolResult.ToolUseID {+ case "q-1":+ blockedSeen = true+ require.Contains(t, msg.ToolResult.Content, "BLOCKED")+ case "r-1":+ queryExecuted = true+ assert.NotContains(t, msg.ToolResult.Content, "SKIPPED",+ "sibling read call must execute, not be skipped for a refused question")+ }+ }+ require.True(t, blockedSeen)+ require.True(t, queryExecuted)+}++// TestAgenticLoop_LookGateFailsOpenAfterMaxBlocks pins the livelock+// escape hatch: after maxLookGateBlocks refusals with still no tool+// attempt, the next pulse_question goes through to the user.+func TestAgenticLoop_LookGateFailsOpenAfterMaxBlocks(t *testing.T) {+ turn := 0+ provider := &stubStreamingProvider{}+ provider.chatStream = func(ctx context.Context, req providers.ChatRequest, callback providers.StreamCallback) error {+ turn+++ if turn <= maxLookGateBlocks+1 {+ callback(providers.StreamEvent{Type: "done", Data: providers.DoneEvent{+ ToolCalls: []providers.ToolCall{+ {ID: "q-" + string(rune('0'+turn)), Name: pulseQuestionToolName, Input: lookGateQuestionInput()},+ },+ }})+ return nil+ }+ callback(providers.StreamEvent{Type: "content", Data: providers.ContentEvent{Text: "Understood."}})+ callback(providers.StreamEvent{Type: "done", Data: providers.DoneEvent{}})+ return nil+ }++ exec := tools.NewPulseToolExecutor(tools.ExecutorConfig{+ StateProvider: &mockStateProvider{},+ AgentServer: &mockAgentServer{},+ })+ loop := NewAgenticLoop(provider, exec, "base prompt")++ ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)+ defer cancel()++ var (+ mu sync.Mutex+ questionEvt *QuestionData+ )+ doneCh := make(chan struct{})+ var execErr error+ go func() {+ defer close(doneCh)+ _, execErr = loop.ExecuteWithTools(+ ctx,+ "look-gate-failopen-session",+ []Message{{Role: "user", Content: "help me decide"}},+ nil,+ func(event StreamEvent) {+ if event.Type != "question" {+ return+ }+ mu.Lock()+ defer mu.Unlock()+ if questionEvt == nil {+ var qd QuestionData+ _ = json.Unmarshal(event.Data, &qd)+ questionEvt = &qd+ }+ },+ )+ }()++ require.Eventually(t, func() bool {+ mu.Lock()+ defer mu.Unlock()+ return questionEvt != nil && questionEvt.QuestionID != ""+ }, 3*time.Second, 10*time.Millisecond,+ "after %d refusals the question must reach the user", maxLookGateBlocks)++ mu.Lock()+ qID := questionEvt.QuestionID+ mu.Unlock()+ require.NoError(t, loop.AnswerQuestion(qID, []QuestionAnswer{{ID: "q1", Value: "fleet"}}))++ select {+ case <-doneCh:+ case <-ctx.Done():+ t.Fatalf("loop did not complete: %v", ctx.Err())+ }+ require.NoError(t, execErr)+}diff --git a/internal/ai/chat/agentic_question_tool_test.go b/internal/ai/chat/agentic_question_tool_test.goindex 2afbc6c704..81291bcbca 100644--- a/internal/ai/chat/agentic_question_tool_test.go+++ b/internal/ai/chat/agentic_question_tool_test.go@@ -14,6 +14,38 @@ import ("github.com/stretchr/testify/require")+// scriptLookTurn scripts one provider turn that issues a read-only+// pulse_query call. The look-before-asking gate refuses a pulse_question+// issued before any tool attempt in the run, so question-flow tests open+// with a look turn the way real runs now must.+func scriptLookTurn(mockProvider *MockProvider, matcher func(req providers.ChatRequest) bool) {+ queryInput := map[string]interface{}{"action": "topology"}+ mockProvider.On("ChatStream", mock.Anything, mock.MatchedBy(matcher), mock.Anything).Return(nil).Run(func(args mock.Arguments) {+ cb := args.Get(2).(providers.StreamCallback)+ cb(providers.StreamEvent{+ Type: "tool_start",+ Data: providers.ToolStartEvent{ID: "t0", Name: "pulse_query", Input: queryInput},+ })+ cb(providers.StreamEvent{+ Type: "done",+ Data: providers.DoneEvent{+ ToolCalls: []providers.ToolCall{{ID: "t0", Name: "pulse_query", Input: queryInput}},+ },+ })+ }).Once()+}++// hasToolResult reports whether the request carries a tool result for the+// given provider tool-call ID.+func hasToolResult(req providers.ChatRequest, toolUseID string) bool {+ for _, m := range req.Messages {+ if m.ToolResult != nil && m.ToolResult.ToolUseID == toolUseID {+ return true+ }+ }+ return false+}+func TestAgenticLoop_PulseQuestionToolInteractiveFlow(t *testing.T) {executor := tools.NewPulseToolExecutor(tools.ExecutorConfig{})mockProvider := &MockProvider{}@@ -25,9 +57,14 @@ func TestAgenticLoop_PulseQuestionToolInteractiveFlow(t *testing.T) {sessionID := "question-session"messages := []Message{{Role: "user", Content: "Do something but ask me first"}}- // Turn 1: model requests pulse_question- mockProvider.On("ChatStream", mock.Anything, mock.MatchedBy(func(req providers.ChatRequest) bool {+ // Turn 1: model looks with a read tool (satisfies the gate).+ scriptLookTurn(mockProvider, func(req providers.ChatRequest) bool {return len(req.Messages) == 1+ })++ // Turn 2: model requests pulse_question+ mockProvider.On("ChatStream", mock.Anything, mock.MatchedBy(func(req providers.ChatRequest) bool {+ return hasToolResult(req, "t0") && !hasToolResult(req, "t1")}), mock.Anything).Return(nil).Run(func(args mock.Arguments) {cb := args.Get(2).(providers.StreamCallback)cb(providers.StreamEvent{@@ -76,7 +113,7 @@ func TestAgenticLoop_PulseQuestionToolInteractiveFlow(t *testing.T) {})}).Once()- // Turn 2: model sees tool result and replies.+ // Turn 3: model sees the answered question and replies.mockProvider.On("ChatStream", mock.Anything, mock.MatchedBy(func(req providers.ChatRequest) bool {// Expect tool result message for t1 to be presentfor _, m := range req.Messages {diff --git a/internal/ai/chat/agentic_steering_test.go b/internal/ai/chat/agentic_steering_test.goindex d27acccaa1..04721c1c2e 100644--- a/internal/ai/chat/agentic_steering_test.go+++ b/internal/ai/chat/agentic_steering_test.go@@ -31,9 +31,15 @@ func TestAgenticLoop_SteerInjectsAtNextTurnBoundary(t *testing.T) {messages := []Message{{Role: "user", Content: "Do something but ask me first"}}const steerPrompt = "actually check pve2 as well"- // Turn 1: model requests pulse_question (blocks until answered).- mockProvider.On("ChatStream", mock.Anything, mock.MatchedBy(func(req providers.ChatRequest) bool {+ // Turn 1: model looks with a read tool (the look-before-asking gate+ // refuses a first-action pulse_question).+ scriptLookTurn(mockProvider, func(req providers.ChatRequest) bool {return len(req.Messages) == 1+ })++ // Turn 2: model requests pulse_question (blocks until answered).+ mockProvider.On("ChatStream", mock.Anything, mock.MatchedBy(func(req providers.ChatRequest) bool {+ return hasToolResult(req, "t0") && !hasToolResult(req, "t1")}), mock.Anything).Return(nil).Run(func(args mock.Arguments) {cb := args.Get(2).(providers.StreamCallback)toolInput := map[string]interface{}{@@ -60,8 +66,8 @@ func TestAgenticLoop_SteerInjectsAtNextTurnBoundary(t *testing.T) {})}).Once()- // Turn 2: the request must carry the steer as a user message AFTER the- // tool result for t1.+ // Final turn: the request must carry the steer as a user message AFTER+ // the tool result for t1.mockProvider.On("ChatStream", mock.Anything, mock.MatchedBy(func(req providers.ChatRequest) bool {toolResultIndex := -1steerIndex := -1@@ -237,8 +243,9 @@ func TestService_ExecuteStream_SteeredMessagePersists(t *testing.T) {const steerPrompt = "steer: also check the replication lag"sessionID := "sess-steer-persist"- // Turn 1: block on a question; the test steers through the SERVICE while- // blocked, then answers.+ // Turn 1 looks with a read tool (the look-before-asking gate refuses a+ // first-action pulse_question); turn 2 blocks on a question; the test+ // steers through the SERVICE while blocked, then answers.toolInput := map[string]interface{}{"questions": []interface{}{map[string]interface{}{@@ -247,13 +254,16 @@ func TestService_ExecuteStream_SteeredMessagePersists(t *testing.T) {},},}+ scriptLookTurn(mockProvider, func(req providers.ChatRequest) bool {+ return !hasToolResult(req, "t0")+ })mockProvider.On("ChatStream", mock.Anything, mock.MatchedBy(func(req providers.ChatRequest) bool {for _, m := range req.Messages {if m.Role == "user" && m.Content == steerPrompt {return false}}- return true+ return hasToolResult(req, "t0")}), mock.Anything).Return(nil).Run(func(args mock.Arguments) {cb := args.Get(2).(providers.StreamCallback)cb(providers.StreamEvent{diff --git a/internal/ai/chat/interaction_scenario_corpus_test.go b/internal/ai/chat/interaction_scenario_corpus_test.goindex c03e71d8a5..de53c54642 100644--- a/internal/ai/chat/interaction_scenario_corpus_test.go+++ b/internal/ai/chat/interaction_scenario_corpus_test.go@@ -78,6 +78,24 @@ func providerEmptyDone() scriptedProviderCall {}}}+func providerQuestionToolCall(callID string) scriptedProviderCall {+ questionInput := map[string]interface{}{+ "questions": []interface{}{+ map[string]interface{}{+ "id": "q1", "type": "select",+ "question": "Which specific resource are you interested in checking?",+ "options": []interface{}{map[string]interface{}{"label": "Fleet", "value": "fleet"}},+ },+ },+ }+ return scriptedProviderCall{events: []providers.StreamEvent{+ {Type: "tool_start", Data: providers.ToolStartEvent{ID: callID, Name: "pulse_question", Input: questionInput}},+ {Type: "done", Data: providers.DoneEvent{+ ToolCalls: []providers.ToolCall{{ID: callID, Name: "pulse_question", Input: questionInput}},+ }},+ }}+}+type interactionScenario struct {name string// promise states the user-visible behavior this scenario pins, in plain@@ -167,6 +185,20 @@ func interactionScenarios() []interactionScenario {`{"`,},},+ {+ name: "natural first question produces an answer, not a question",+ promise: "a first-action elicitation (\"which resource do you mean?\") issued before any tool attempt is refused invisibly and the model is steered to look with tools — the user asking a natural first question reads an answer, never a clarification card",+ prompt: "are there any alerts I should look at?",+ calls: []scriptedProviderCall{+ providerQuestionToolCall("call_q1"),+ providerQueryToolCall("call_r1"),+ providerContentDone("No active alerts right now — everything looks healthy."),+ },+ maxTurns: 6,+ orderedTypes: []string{"session", "tool_start", "tool_end", "content", "done"},+ forbiddenTypes: []string{"question", "error"},+ answerMustContain: []string{"No active alerts"},+ },{name: "provider failure before events retries invisibly",promise: "a provider stream that dies before producing anything is retried without surfacing an error or a dead turn to the user",diff --git a/internal/ai/chat/service.go b/internal/ai/chat/service.goindex 71689b76e6..8984d262bc 100644--- a/internal/ai/chat/service.go+++ b/internal/ai/chat/service.go@@ -3814,6 +3814,7 @@ func (s *Service) buildSystemPromptWithToolGovernance(toolGovernance string) str- Resolve a missing target yourself before asking: use read-only query/topology tools to see which hosts, VMs, or containers exist. If exactly one plausible target matches the request (a single connected host, or one resource by that name), run read-only diagnostics against it and name the target in your answer instead of asking.- Ask for the target only when several plausible targets remain after looking, or when the action changes state. If a structured clarification tool is offered, use it for missing critical information (target, risky choice, preference); otherwise ask in normal assistant text.- The same rule covers tool arguments: when a tool call fails because an argument is missing or invalid, recover yourself — enumerate the missing values with read-only tools (or retry the tool with the arguments it says it accepts) instead of asking the user. Never ask the user for internal identifiers such as resource IDs, UUIDs, or metric keys; users do not know them, and questions are reserved for preferences, risky choices, and genuine ambiguity between named options.+- Asking may not be your first action: a clarification request issued before you have attempted any tool call this turn will be rejected. For broad questions ("how is my infrastructure doing?", "any alerts?"), call the obvious read-only tool with defaults — pulse_summarize {"action":"fleet"} needs no parameters, and the alert tools list everything without a target.- Never guess a target you did not resolve. Do not attempt a tool call with current_resource or another placeholder as a stand-in for a missing target — in autonomous mode the same rules apply: resolve with read-only tools first, then ask in normal assistant text if genuine ambiguity remains.## HOW TO RESPOND