grok: fix xsearch (multi-agent web_search), pin grok-build, RTFM doc sweep
Root-caused the long-standing `ask-grok.sh xsearch` "no result (stopReason=)" failure by reading Grok's bundled docs (~/.grok/docs/user-guide + README) instead of probing: - web_search runs a SEPARATE multi-agent model (grok-4.20-multi-agent), so the wrapper's blanket --no-subagents strangled it -> indefinite hang, 0 bytes. Scoped --no-subagents OFF xsearch; use --yolo (documented headless tool-run posture). - xsearch prompt mandated X/Twitter search on every call (slow multi-agent) and the budget was 240s -> still timed out. Now web-primary (X only when relevant), 300s. Validated end-to-end through the wrapper: 23s, correct answer + 3 sources. Model: pin -m grok-build (xAI flagship, 512k, the documented default) for the reasoning modes (text/verify/review*) so quality is deterministic and not at the mercy of the runtime default (this machine drifted to grok-composer-2.5-fast, a fast Cursor coding model). xsearch + image/video keep the runtime default. Validated text mode on grok-build (13s). Doc accuracy (SKILL.md): corrected the model facts (default, the separate web_search model, --effort unsupported on grok-build per supports_reasoning_effort:false); documented the xsearch subagent exception. Fixed a stale in-script comment claiming --rules/--disallowed-tools "tripped the CLI" (both are valid headless flags). memory: add feedback_interview_ai_read_docs (read bundled docs / interview the model before probing) + index; errorlog correction. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
- [Point vault-access teammates at SOPS path](feedback_vault_pointer_for_teammates.md) — When relaying infra/credential info to Howard or other vault-access teammates, hand over the SOPS path + key anchors; don't transcribe the entry's fields into the message.
|
||||
- [/tmp path mismatch on Windows](feedback_tmp_path_windows.md) — Write tool and Git Bash resolve `/tmp` to DIFFERENT real dirs. Use heredoc or workspace path for JSON payloads handed to curl.
|
||||
- [Windows strips embedded double-quotes](feedback_windows_quote_stripping.md) — Embedded `"` in an arg gets eaten twice over: PowerShell->curl.exe (CommandLineToArgvW) AND RMM->cmd.exe. Use single-quoted heredoc `<<'JSON'` + `--data-binary @-` for bodies; build `"` from `[char]34`; or drop the quoted part (e.g. `shutdown /c`).
|
||||
- [Interview the AI / read its docs before probing](feedback_interview_ai_read_docs.md) — To learn an external AI/CLI's syntax or capabilities, READ its bundled docs (Grok: `~/.grok/docs/user-guide/`, `README.md`, `grok inspect`/`models`/`--help`) or interview the model; don't guess flags or run slow trial-and-error. One run to confirm a doc-derived hypothesis, not a dozen to discover.
|
||||
- [Windows bash command mapping](feedback_windows_bash_mapping.md) — `bash` often resolves to WSL stub instead of Git/MSYS bash required by the harness. Fix by prepending `C:\Program Files\Git\bin` (and usr\bin) to PATH, or source `.claude/scripts/ensure-git-bash.ps1`. Profile has the logic; use plain `bash .claude/scripts/...` after remap. See the helper and this memory file for details.
|
||||
- [Git must authenticate non-interactively](feedback_git_noninteractive_auth.md) — Mike's gripe with Git for Windows is the constant password prompts (GCM) that hang automation, NOT the tool itself. D:\ClaudeTools is set to `credential.helper=store` primed with the azcomputerguru Gitea API token (host 172.16.3.20:3000); always set `GIT_TERMINAL_PROMPT=0`. Any never-prompts solution is acceptable.
|
||||
- [Vault git auth — GCM shadows store token](feedback_vault_gcm_shadow_auth.md) — vault sync "Failed to authenticate user" on git.azcomputerguru.com: GCM is first in the helper chain and shadows the valid store token. Fix (machine-local): store-only credential.helper reset + pin `azcomputerguru@` in the vault remote URL so store returns the durable PAT (not the volatile OAUTH_USER JWT). Applied GURU-5070 2026-06-07.
|
||||
|
||||
35
.claude/memory/feedback_interview_ai_read_docs.md
Normal file
35
.claude/memory/feedback_interview_ai_read_docs.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: feedback_interview_ai_read_docs
|
||||
description: Before guessing or probing an external AI/CLI's command syntax or capabilities, READ its bundled docs and/or interview the model itself — probing wastes tokens and misleads.
|
||||
metadata:
|
||||
type: feedback
|
||||
---
|
||||
|
||||
When you need to understand an external AI's or CLI tool's **command syntax or
|
||||
capabilities**, do NOT blindly guess flags or run slow trial-and-error probes.
|
||||
First **read its own bundled documentation**, and/or **interview the model
|
||||
itself** (ask it to read its own docs and explain). The authoritative source is
|
||||
almost always already on disk.
|
||||
|
||||
**Why:** repeated timed probing is expensive (each Grok run is 80-300s), gives
|
||||
ambiguous signals, and is the exact "blindly guessing or probing" pattern Mike
|
||||
has flagged. The docs answer the question directly and for free.
|
||||
|
||||
**Concrete example (the lesson):** the long-standing `ask-grok.sh xsearch`
|
||||
"no result (stopReason=)" failure was root-caused not by probing but by reading
|
||||
**`~/.grok/docs/user-guide/` (esp. `14-headless-mode.md`, `11-custom-models.md`,
|
||||
`05-configuration.md`) and `~/.grok/README.md`**. They revealed: `web_search`
|
||||
runs a SEPARATE multi-agent model (`grok-4.20-multi-agent`), so the wrapper's
|
||||
blanket `--no-subagents` strangled it; the documented headless JSON schema is
|
||||
`{text,stopReason,sessionId,requestId}`; and `--yolo` is the documented
|
||||
tool-run posture. One confirmatory run, not a dozen.
|
||||
|
||||
**How to apply:**
|
||||
- For the Grok CLI: read `~/.grok/docs/user-guide/*.md` and `~/.grok/README.md`
|
||||
(and `grok inspect` / `grok models` / `grok <cmd> --help` for live truth)
|
||||
before changing [[feedback_windows_quote_stripping]]-style wrapper internals.
|
||||
- For any vendor CLI/API: locate its shipped docs/`--help`/OpenAPI first; treat
|
||||
one targeted run as *confirmation* of a doc-derived hypothesis, not as the
|
||||
discovery method.
|
||||
- Interviewing the model (its text path) is valid even when a tool path is
|
||||
broken — asking Grok doesn't require its web_search to work.
|
||||
Reference in New Issue
Block a user