Ensure parallel tool results finish before follow-ups, preserve warping
status across exchanges, clean up streams before crosscheck reviews, and
restore terminal focus when conversations complete. Remove temporary
debug
logging.
- Gate server requests on available credentials
- Run local child agents directly without a parent run ID
- Include command IDs in Bedrock context and recognize transfer tools
Add the 'Crosscheck Work' experiment to the Agents settings. When enabled,
a reviewer sub-agent is spawned after the main agent finishes a turn (with
no pending tool calls). The reviewer critiques the output using a dedicated
system prompt focused on correctness, simplicity, and code quality. If the
reviewer does not respond with 'LGTM!', its feedback is injected as a
synthetic user query back to the main agent, which must address it. This
loop continues until the reviewer approves or max iterations is reached.
Components:
- Feature flag: CrosscheckWork (enabled in DOGFOOD_FLAGS)
- Settings: agents.experiments.crosscheck_enabled,
agents.experiments.crosscheck_model_id,
agents.experiments.crosscheck_max_iterations
- Settings UI: new 'Experiments' subpage under Agents
- Crosscheck module: app/src/ai/crosscheck/ with prompt, reviewer model
- Controller integration: hooks into AfterStreamFinished when no actions
are queued, triggers reviewer, handles feedback injection
- Provider support: OpenAI-compatible and Bedrock direct invocation
- Safety: max iteration guard, error handling, reset on new user query
- Sanitize tool_use_id values in OpenAI request conversion to match
Bedrock's required pattern ^[a-zA-Z0-9_-]+$. Fixes 400 errors when
LiteLLM proxies to Bedrock and tool IDs contain invalid characters.
- Parse cache usage stats from LiteLLM/OpenAI responses
(prompt_tokens_details.cached_tokens, cache_read_input_tokens,
cache_creation_input_tokens) and propagate to token usage tracking.
- Hide cache-o-meter in session status bar when provider doesn't report
cache data (LiteLLM/OpenAI), instead of showing misleading 0% stats.
- Update cost estimation to account for cache read/write pricing tiers.
When a skill was invoked on a clean slate (no conversation history),
the request sent to the AI provider contained only a system prompt
with zero user messages, causing Bedrock/LiteLLM to reject it with:
'Invalid Message bedrock requires at least one non-system message'
Root cause: extract_new_input_messages() had no handler for
Type::InvokeSkill, so it fell through to the _ => {} wildcard and
produced zero ConversationMessage results.
Fix adds InvokeSkill handling to three functions:
- extract_new_input_messages(): generates a User message with the
skill name and content wrapped in <skill-instructions> tags
- extract_input_messages(): persists the InvokeSkill as a proper
api::Message in task history for conversation continuity
- extract_user_query_text(): returns '/<skill-name>' for the
UserQuery proto event used in conversation title generation
- Load global rules (AIFact/AIMemory) from local CloudModel and inject
them into the Bedrock/OpenAI system prompt as a '## Global Rules' section
when memory is enabled.
- Fix rule seeding: always re-seed predefined rules when the CloudModel has
none, regardless of the has_seeded_predefined_rules flag (handles case
where flag was set but rules never persisted due to prior missing owner).
- Rename /context slash command to /copy-context: dumps the full context
window (global rules, progressive summary, message history) to the
clipboard for debugging.