Repository navigation
[Idea] Allow per-call promoteOnTimeout / killOnTimeout override on the bash tool (54-run evaluation on dsh 0.2.2-rc.5)
#14270
zsicheng0214
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Motivation
By default, DeepSeek Harness's
bashtool promotes timed-out commands to a background job (promoteOnTimeout: true) and returns[still running after <N>ms; moved to background job ...]. That default is very useful when a long-running build, server, or migration should keep running in the background.However, when the caller or model actually needs a hard deadline with an unambiguous failure/termination signal (e.g., bounded probes, hung commands, or verification scripts that must not keep mutating the workspace in the background), background promotion introduces a clear trade-off:
promoteOnTimeoutvia a static profile patch (no-promote-on-timeout.yml) fixes hard-deadline tasks, but forces a global all-or-nothing choice across the entire session—slightly hurting tasks where background handoff is desired.Controlled 54-Run Evaluation (
dsh 0.2.2-rc.5)We ran a paired A/B experiment on DeepSeek Harness
0.2.2-rc.5(dsh --profile sdk,deepseek-flash, 9 timeout tasks × 3 repeats × 2 arms = 54 Docker runs, 0 infrastructure errors) using TraceTrial-Bench (E3-firmware-timeout-001…E3-windowcut-006andE6-reindex-timeout-channel-001…E6-timeout-error-channel-003):promoteOnTimeout: true)promoteOnTimeout: false, kill)Per-task mean agent-layer pass rate (3 repeats each):
promoteOnTimeout: false(kill)E3-firmware-timeout-001E3-longrun-timeout-002E3-pipeline-timeout-003E3-restore-latency-004E6-reindex-timeout-channel-001E6-suite-timeout-channel-002E6-timeout-error-channel-003E3-pollhandoff-005E3-windowcut-006Full experiment write-up, profile patch, and per-run
results.jsonare open-sourced here:Proposal
Keep the existing profile-level
promoteOnTimeoutsetting as the default, and expose an optional per-call boolean parameter on thebashtool schema—for example:promoteOnTimeout?: boolean(orkillOnTimeout?: boolean), defaulting to the profile configuration.When
promoteOnTimeout: false(orkillOnTimeout: true) is passed on a specific call:SIGTERM→SIGKILLfallback if signals are trapped) instead of promoting it to a background job;[timed out after <N>ms]/[killed by signal: SIGTERM]) so the model and downstream observers know the command is no longer running.This preserves DSH's background-job workflow for long-running tasks while letting agents and SDK callers opt into hard deadlines on individual commands without maintaining separate profile patches.
Happy to share additional traces or run follow-up paired benchmarks on newer
dshRCs if helpful!All reactions