A stalled Anthropic SSE stream caused a run to hang for 10 minutes
until the stall watchdog killed it. The HTTP connection succeeded but
no SSE events arrived, and with stream_read_timeout defaulting to None
the read blocked indefinitely.
- Set AdapterTimeout default stream_read to 300s (5 min), matching
the idle timeout used by OpenAI Codex
- Increase BackoffConfig default initial_delay_ms from 200ms to 5s
so transient LLM failures get meaningful recovery time before retry
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds two new tests to the Daytona integration suite:
1. `daytona_exec_command_cancelled`: verifies that an active token cancellation properly aborts a running command and yields a correct exit code/message.
2. `daytona_exec_command_local_timeout`: tests the recent fix that prevents commands from hanging indefinitely by enforcing a local timeout fallback.
The Daytona SDK HTTP client can sometimes hang indefinitely if the connection
drops or the server stops responding. Since `daytona_sandbox.rs` was awaiting
the `execute_command` call directly, this could cause the entire workflow engine
to stall, eventually triggering the stall watchdog.
This wraps the `execute_command` call in a `tokio::select!` block, enforcing
the requested `timeout_ms` locally (with a 5s grace period) and respecting
the `cancel_token`.
Co-Authored-By: Gemini CLI <noreply@google.com>
- Forward-order hunk application with cursor tracking (fixes duplicate line matching)
- Accept `@@ context` without trailing ` @@` (backward compat preserved)
- Stacked `@@` anchors collapse to single hunk using last context
- `*** End of File` marker for backward search from end of file
- `*** Move to:` for file renames during update
- 4-pass fuzzy matching: exact → trim_end → trim → unicode normalization
- Heredoc wrapper stripping (<<EOF / <<'EOF' / <<"EOF")
- Update system prompt to use canonical `@@ context` format
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The start node is a no-op (StartHandler returns success immediately), so its
git checkpoint commit is always empty. Skipping it reduces noise in git history
without losing any data — the checkpoint JSON is still saved to disk, and the
next node's diff falls back to base_sha correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When apply_patch fails because a context anchor line doesn't match, the
model had no visibility into what the file actually contained and would
retry blindly. Now the error includes numbered file contents (truncated
to 9K chars via HeadTail mode) so the model can self-correct in one try.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract repeated `tool_calls.back().map_or(&spinner, |e| &e.bar)` into
`ActiveStage::last_bar()` (used in 4 places)
- Clean up existing compaction_bar before overwriting in CompactionStarted
- Tidy CompactionCompleted handler to inline the if-let chain
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Unresolved @file references in node prompts or graph goals silently
passed through as literal text. Now caught at validation time with
a clear error and fix hint.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The compaction progress bar was stored as a single global field on
ProgressUI, which meant parallel stages could clobber each other's
compaction bar. Move it into ActiveStage so each stage tracks its own.
Also clean up compaction_bar in finish_stage to prevent stale spinners.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
resolve_file_ref now expands tilde via dirs::home_dir() and uses
canonicalize() to resolve .., symlinks, and verify existence in one step.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Compaction events were previously only shown with `-v`. Since compaction
takes time and changes agent behavior, display a spinning progress bar
on CompactionStarted and a summary line on CompactionCompleted regardless
of verbose mode.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The toolbox API does not support envs in /process/execute, so the
SDK now matches the Go SDK: accepts env in options but does not send
it. Arc uses export prepending as the workaround.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Daytona toolbox's /process/execute endpoint does not yet process
the envs field (not in its OpenAPI spec), so prepend export statements
as a fallback. The SDK also sends envs for forward compatibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The upstream SDK now passes env vars through ExecuteRequest.envs,
so we no longer need to prepend export statements to commands.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Daytona toolbox API's ExecuteRequest struct has no env field,
so ExecuteCommandOptions.env is silently dropped. Prepend export
statements to the command string to inject env vars into the shell.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These are local test files like imagegen.dot/imagegen.toml.
They live in gitignored tmp/ and don't need to be tracked.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously sandbox env vars only reached CLI backend agents but not
API backend tool calls. Thread tool_env through ToolContext so shell
and web_fetch tools pass env vars to exec_command for all backends.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hoist OneShotCapturingBackend to module scope and remove two identical
CapturingBackend definitions that duplicated its functionality.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prompt nodes now discover project docs (AGENTS.md, CLAUDE.md, etc.)
and pass them as a system prompt to one_shot LLM calls. The
project_memory attribute defaults to true and can be set to false
to disable this behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Watermark-based skill that detects code changes since the last run,
maps them to affected doc pages via a code-to-doc mapping table, and
makes surgical edits. Watermark file created on first run.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow passing environment variables into sandbox command execution via
`[sandbox.env]` in TOML configs. Supports literal values and host env
passthrough via `${env.VARNAME}` syntax (whole-value only, missing vars
are hard errors). Env vars are injected into command nodes via
`cmd.envs()` and into CLI backend agents via the sandbox env file.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move docs/naming/changelog-guide.md into the skill's references/
directory and de-duplicate SKILL.md against guide.md and format.md.
Each file now has a single responsibility: SKILL.md (workflow steps),
guide.md (writing conventions), format.md (MDX template).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The skill previously used the most recent entry date as an exclusive
cutoff, so re-running on the same day would skip commits that landed
after the first run. Make the date range inclusive and regenerate
existing files with the full set of commits for that day.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract read_existing_id() helper to deduplicate file-read-trim-check
pattern, and extract private Telemetry::new() to consolidate for_server/for_cli.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Server is long-lived on a fixed host, so a persisted UUID at ~/.arc/.id is
appropriate. CLI runs ephemerally, so an MD5 of the MAC address avoids file
I/O and is stable per-machine. CLI falls back to ~/.arc/.id if it exists
for migration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a telemetry library for product analytics with Segment integration.
Includes Track/User wire types, persistent anonymous ID (~/.arc/anonymous_id),
OS/arch/locale context, fire-and-forget sender via tokio::spawn, and
ARC_TELEMETRY env var control (off/errors/all). No CLI or server integration yet.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cloud sandboxes clone the repo, so untracked local files referenced via
prompt="@path/to/file.md" won't exist. This inlines those file contents
at prepare time while leaving git-tracked @references for the agent to
read from the sandbox.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract ContentPart::is_opaque_openai() to deduplicate matches! patterns
- Use std::mem::take to avoid cloning reasoning/message items
- Replace hand-rolled DockerfileSource serde with derive + untagged enum
- Add --fail-with-body to imagegen curl for better error reporting
- Add tmp to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allows overriding the workflow goal from the command line, which is
exposed as $goal in node prompts via VariableExpansionTransform.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add DockerfileSource enum (Inline/Path) with custom serde to allow
referencing a Dockerfile by path instead of embedding content inline.
Paths are resolved relative to the config file directory during loading.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bash script that calls the Gemini API (gemini-2.5-flash-image) to generate
images from text prompts. Reads GEMINI_API_KEY from .env.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace 16 raw string literal usages of "openai_reasoning" and
"openai_message" across openai.rs and history.rs with constants
defined on ContentPart, eliminating typo risk and centralizing
the kind identifiers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When an assistant turn has reasoning + text + tool calls, the message
output item was reconstructed without its original `id` and `status`
fields. The Responses API requires reasoning items to be followed by
a valid output item identified by `id`, so the reconstructed message
was not recognized, causing "Item 'rs_...' was provided without its
required following item" errors.
Preserve the full message output item as an opaque `openai_message`
provider part (like we already do for `openai_reasoning`), and use it
in translate_input instead of constructing a new message from text.
Also strip `openai_message` items during compaction alongside reasoning.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement the server-side session handlers (create, retrieve, send message,
stream events, list) with in-memory storage and LLM generation, wire them
into the router replacing not_implemented stubs, add run_chat_via_server
CLI function with SSE streaming, and add mode dispatch so `arc llm chat
--mode server` delegates to the API server.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>