Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Maka currently treats provider/runtime timeout as an attempt-level failure and, while budget remains, starts a fresh autonomous attempt. This preserves the existing verifier/scorer path, but it loses the live attempt trajectory: the next attempt gets a retry prompt and compact progress/evidence rather than the same model-visible runtime history and the same workspace state.
Source-backed current behavior:
runAutonomousTask()createsattempt-N, callsrunTaskOnce(), records decision, and starts another attempt on retry/continue while budget remains.runTaskOnce()creates a fresh throwaway workspace, session, turn, andAgentRunper attempt, then cleans the workspace infinally.- Runtime/provider timeout currently falls through to generic
agent_failedclassification. - Heavy-task progress/evidence is prompt-projected into retries, but full runtime replay and workspace diffs/content are not available across attempts.
- Runtime replay exists within a session, while autonomous attempts create fresh sessions.
Desired behavior:
- Persist a checkpoint after each accepted model/tool/checkpoint boundary.
- On provider/runtime timeout, classify timeout explicitly and prefer checkpoint resume when a valid checkpoint exists.
- Restore model-visible state from durable runtime/session events and workspace-visible state from a resumable snapshot/diff/artifact ref.
- Keep retry as a fallback when checkpoint resume is missing, invalid, or fails, with explicit taxonomy.
- Do not change official verifier/scorer authority or benchmark isolation.
Implementation areas:
packages/headless/src/task-contracts.ts: timeout/resume taxonomy and result records.packages/headless/src/scorer.ts: preserve timeout failure class.packages/headless/src/autonomous-agent-loop.ts: choose checkpoint resume before retry and render resume-specific prompt.packages/headless/src/task-agent-controller.ts: checkpoint emission, workspace preservation, resume segment startup.packages/headless/src/sandbox.ts: resumable workspace snapshot/diff lifecycle.packages/headless/src/task-run-store.ts: checkpoint and resume events/projection.packages/runtime/src/agent-run.ts,packages/runtime/src/model-history.ts,packages/runtime/src/ai-sdk-backend.ts: replay-complete runtime state and timeout/interruption closure.packages/storage/src/agent-run-store.ts,packages/storage/src/session-store.ts: durable high-water refs for checkpoint replay.packages/headless/src/heavy-task-progress.ts,packages/headless/src/heavy-task-evidence.ts: resume summary/artifact refs, not benchmark-specific prompts.packages/headless/src/harbor-cell.tsand possiblypackages/headless/harbor/maka_agent.py: expose checkpoint/resume/fallback metadata in Harbor output.
Acceptance criteria:
- A synthetic provider timeout after a valid checkpoint starts a checkpoint resume segment before creating a new attempt.
- A timeout without a valid checkpoint falls back to retry with explicit fallback taxonomy.
- Replayed model input has no dangling tool-use state and includes explicit timeout/interruption closure where needed.
- Restored workspace contains files created/modified before timeout.
- Official verifier/scorer calls remain limited to the existing scoring path.
- Resume rejects mismatched task/source/workspace identities.
- A real Harbor smoke with induced inner runtime timeout reports checkpoint/resume metadata in cell output and either completes through existing scoring or records explicit retry fallback.
Non-goals:
- Do not add benchmark-specific strategies or expected-answer/verifier leakage.
- Do not use official verifier output as a resume oracle.
- Do not depend on hidden in-memory executor state as the resume contract.
Activity
Keesan12 commentedon Jun 27, 2026
This is a strong direction. The checkpoint/resume split is usually where retry systems either become trustworthy or quietly start faking continuity.
A few edges I’d explicitly lock down:
The other big one is workspace identity drift. In practice, resume is much safer when the checkpoint stores a compact fingerprint of the visible workspace plus the last committed runtime event offset, so you can reject stale/mutated environments early instead of trying to reason about them mid-run.
That "resume only when the world is provably the same enough" rule has been one of the more useful runtime lessons for us lately. MartinLoop keeps surfacing the same thing from a different angle: the control plane matters more than another polite retry.
likun666661 commentedon Jun 30, 2026
Thanks for spelling this out. I agree with the direction here, especially the "resume only when the world is provably the same enough" rule.
The implementation should treat these as core acceptance constraints, not nice-to-have diagnostics:
That framing keeps checkpoint resume from becoming a hidden retry with continuity-shaped logs. I will fold these points into the follow-up design/implementation criteria for this issue.
likun666661 commentedon Jun 30, 2026
Follow-up after comparing Claude Code/Codex resume semantics and discussing the Maka-specific design:
The useful lesson from Claude Code and Codex is not that we should copy their session resume directly. Both are strong references for conversation/session continuation: transcript, prior tool calls/results, plans/reasoning context, session metadata, and current workspace UX. They do not appear to promise the stronger autonomous benchmark contract this issue needs: safe continuation of an in-flight tool call, shell/process/container restore, full workspace restore, workspace fingerprint validation, runtime-event high-water validation, timeout closure records, or explicit fallback-to-retry reasons.
For Maka, the product thesis should stay closer to the Google ADK-style information-flow model: preserve the original committed message/tool-result stream, then resume from a clean committed boundary. The missing piece is not a competitor-style chat session picker. It is a lightweight way to restore the coding agent's address space alongside that message stream.
A reasonable P0 is therefore Git-backed coarse address-space checkpointing:
At checkpoint time:
At resume time:
If the Git state cannot be restored or validated, resume should be rejected with a stable reason and the system should fall back to attempt-level retry only visibly:
no_checkpointunsupported_timeout_kindworkspace_ref_missingworkspace_dirty_or_driftedruntime_offset_mismatchcheckpoint_restore_faileddangling_tool_stateThis keeps P0 much lighter than a custom agent filesystem. We can use Git as the coarse-grained address-space ledger for coding/benchmark tasks, and let Maka's message/runtime event ledger carry the original information flow. A finer agent-fs journal can remain future work for non-Git workspaces or side-effect-heavy tools.
Open P0 details to decide:
git initattempt workspaces;Acceptance criteria to add or adjust:
In short: P0 should be ADK-style committed information-flow resume + Git-backed coarse workspace restore, not full process resume and not a custom filesystem layer.
zhiiw commentedon Jul 14, 2026
Hi @likun666661 ,
I'd love to take on this issue!
YayoiNanoka commentedon Aug 17, 2026
Hi @likun666661, I’m reviewing older open issues and wanted to confirm the current disposition of this one.
Since this issue was opened, generic safe-boundary resume support landed in #1223, while #2605 replaced the former Headless autonomous-attempt architecture with the current
@maka/eval+ Runtime Host model. As a result, the originalrunAutonomousTask()/ Harbor attempt-level retry integration described here no longer maps directly to the current codebase.Would you consider the original issue resolved or superseded enough to close? If checkpoint resume is still needed for the current Eval architecture, it may be clearer to open a new issue with updated boundaries and acceptance criteria.
点击展开中文
你好 @likun666661,我正在整理较早的 open issue,想确认一下这个 issue 目前应该如何处理。
这个 issue 创建后,#1223 已经实现了通用的安全边界恢复能力;与此同时,#2605 用当前的
@maka/eval+ Runtime Host 模型取代了原来的 Headless autonomous-attempt 架构。因此,这里描述的runAutonomousTask()/ Harbor attempt-level retry 集成已经无法直接对应当前代码。你认为原 issue 是否已经解决,或者已经被新架构取代,可以关闭?如果当前 Eval 架构仍需要 checkpoint resume,或许新建一个符合当前边界和验收标准的 issue 会更清晰。
Astro-Han commentedon Aug 23, 2026
Closing as superseded. Generic safe-boundary resume landed in #1223, while #2605 replaced the Headless autonomous-attempt architecture this issue targets with the current
@maka/eval+ Runtime Host boundary. The namedrunAutonomousTask()/ attempt-workspace integration points no longer describe the product.If Eval still needs checkpoint restoration across Attempts, it should be specified against the current Experiment → Cell → Attempt → Result model rather than carried forward under these obsolete boundaries.
Triage and wording were prepared with OpenAI Codex and reviewed by the maintainer.