feat: auto-capture agent trajectory during benchmark tasks#2
Open
hj1650782738 wants to merge 1 commit intoQuantaAlpha:devfrom
Open
feat: auto-capture agent trajectory during benchmark tasks#2hj1650782738 wants to merge 1 commit intoQuantaAlpha:devfrom
hj1650782738 wants to merge 1 commit intoQuantaAlpha:devfrom
Conversation
Add 3-level trajectory capture system: 1. Agent-written rich trajectory (/.epochx/trajectory.jsonl) 2. Auto-recorded SSH command log via BASH_ENV + DEBUG trap 3. Git log fallback for minimal trajectory data Changes: - runtime.py: Inject BASH_ENV + DEBUG trap into container for auto-logging SSH commands - prompt_generator.py: Add Trajectory section to generated prompt.md - runner.py: Add _collect_trajectory() with 3-level source merging - exporter.py: Include trajectory/output in get_task_results() - cli.py: Attach trajectory/output to submit-run API payload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add automatic trajectory capture during benchmark task execution. This enables recording what actions an agent took to solve a task, which is critical for analysis, debugging, and leaderboard submissions.
3-Level Trajectory Capture
The system collects trajectory data from three sources, in priority order:
/.epochx/trajectory.jsonl) -- Rich structured data written by the agent itself (reasoning steps, tool calls, observations)/.epochx/ssh_log.jsonl) -- Automatically recorded viaBASH_ENV+DEBUGtrap injected into the container. Captures every bash command executed over SSH, including non-interactive sessions.Changed Files
src/epochx/core/runtime.py-- InjectBASH_ENV+DEBUGtrap into Docker container setup for auto-logging all SSH commands to/.epochx/ssh_log.jsonlsrc/epochx/core/prompt_generator.py-- Add optional "Trajectory" section to the generated prompt, guiding agents to write rich trajectory datasrc/epochx/runner.py-- Add_collect_trajectory()method that merges all 3 sources; attach trajectory to grading resultssrc/epochx/exporter.py-- Includetrajectoryandoutputfields inget_task_results()for exportsrc/epochx/cli.py-- Attachtrajectoryandoutputto thesubmit-runAPI payload