Synced from monorepo

Synced from monorepo

Changes:
- Workspace task snapshots only list incomplete backgrounded tasks
- Quiet auth, LSP, and config warnings in the shell
- Fix observability attributes for warm store errors, restore setup, remote tools, and preview denials
- Fail closed when soak metrics are missing
- Run plan-mode exit last in mixed tool batches
- Allow /loop to store prompts that can terminate the loop
- Make subagent maximum nesting depth configurable
- Security: apply sandbox profile to the leader process that executes tools

Source-Revision: 1adcd1f477870e4a97bacbd6be78c8a3bfbac46d
This commit is contained in:
grokkybara[bot] 2026-07-27 17:54:34 +00:00
commit 02d9359435
96 changed files with 2346 additions and 351 deletions

View file

@ -168,6 +168,25 @@ pub(crate) fn parse_session_load_running_prompt_id(
.and_then(|v| v.as_str())
.map(String::from)
}
/// CANONICAL wire parser for the `session/new` / `session/load` response
/// `_meta[SCHEDULER_BACKGROUND_LOOPS_META_KEY]`.
///
/// Carries whether THIS session's scheduled fires run as detached background
/// subagents, as the shell resolved it when the session's actor spawned. The
/// pager stores it per session and must not re-resolve the setting: a
/// mid-session flip would then make `/loop`'s wording describe a runtime the
/// already-spawned session will never use. `None` when the shell predates the
/// key (or for gateway chat sessions, which have no local fires), leaving the
/// reader on the startup seed.
pub(crate) fn parse_session_scheduler_background_loops(
resp_meta: Option<&acp::Meta>,
) -> Option<bool> {
resp_meta
.and_then(|m| {
m.get(xai_grok_shell::session::SCHEDULER_BACKGROUND_LOOPS_META_KEY)
})
.and_then(|v| v.as_bool())
}
/// Whether `raw` is (or wraps) a disk-full / ENOSPC failure.
fn is_disk_full_error(raw: &str) -> bool {
raw.contains(xai_fast_worktree::OUT_OF_DISK_CONTEXT)

View file

@ -11,7 +11,9 @@ use super::session_title_resolve::worktree_resume_failure_message;
#[allow(unused_imports)]
use super::{agent, dispatch};
pub use helpers::ConversationsPartial;
pub(super) use helpers::parse_session_load_running_prompt_id;
pub(super) use helpers::{
parse_session_load_running_prompt_id, parse_session_scheduler_background_loops,
};
pub(crate) use helpers::{
EffectMeta, RestoreProgressMsg, SessionFlags, persist_permission_mode_and_notify,
persist_setting, sanitize_user_error,
@ -199,6 +201,9 @@ pub(crate) fn execute(
agent_id,
session_id: resp.session_id,
models: resp.models,
scheduler_background_loops: parse_session_scheduler_background_loops(
resp.meta.as_ref(),
),
}
}
Err(e) => {
@ -493,6 +498,9 @@ pub(crate) fn execute(
worktree_path: worktree_root,
session_cwd,
models: resp.models,
scheduler_background_loops: parse_session_scheduler_background_loops(
resp.meta.as_ref(),
),
}
}
Err(e) => {
@ -574,6 +582,9 @@ pub(crate) fn execute(
restore_summary,
restore_degree,
running_prompt_id,
scheduler_background_loops: parse_session_scheduler_background_loops(
resp.meta.as_ref(),
),
}
}
Err(e) => {