Skip to content

feat: implement session-based output organization (#1032)#1347

Open
ilonae wants to merge 2 commits into
FoundationAgents:mainfrom
ilonae:feat/session-output-organization
Open

feat: implement session-based output organization (#1032)#1347
ilonae wants to merge 2 commits into
FoundationAgents:mainfrom
ilonae:feat/session-output-organization

Conversation

@ilonae
Copy link
Copy Markdown

@ilonae ilonae commented Apr 4, 2026

  • Implement session-based output organization with unique timestamped folders
  • Create organized subfolders for guides, code, and data outputs
  • Improve tool parameter validation with explicit system prompt guidance
  • Fix session folder path resolution to use workspace root correctly

Feature Docs

Influence

  • Solves persistent problem of research outputs being scattered across the workspace
  • Prevents FileNotFoundError when creating files in session subfolders
  • Improves agent reliability by enforcing all required tool parameters through explicit system prompt guidance
  • Enables future features like automatic output collection and result aggregation

Result
Successfully tested with multiple LLMs (Claude via Jiekou.AI, Llama):

  • Session folders created: `workspace/output/session_YYYYMMDD_HHMMSS/`
  • Subfolders organized: guides/, code/, data/
  • Files created with complete parameters: command, path, file_text
  • Absolute paths resolved correctly
  • No FileNotFoundError or missing parameter errors

Other

  • Two commits in this branch:
    1. `2d728fd` - Implement session organization and tool validation improvements
    2. `ccd9fc0` - Fix session folder path to use workspace_root
  • Configuration handles optional Daytona settings gracefully
  • Works with different LLM providers (tested with Claude and Llama)" --base main

ilonae added 2 commits April 5, 2026 03:49
…rameter validation

Session Output Organization (Fixes FoundationAgents#1032):
- Generate unique timestamped session folders at agent startup
- Create organized subfolders: guides/, code/, data/
- Dynamically inject session folder information into system prompt
- Add get_session_path() helper method for tools to reference session locations
- Automatically create folder structure with proper validation

Tool Parameter Validation Improvements:
- Enhanced system prompt with EXPLICIT guidelines for tool usage
- Detailed requirements for str_replace_editor 'create' command
- Clear instructions that 'file_text' parameter is NEVER optional for 'create'
- Explicit guidance for python_execute, browser_use_tool, and ask_human tools
- Added CRITICAL instruction: always provide ALL required parameters

Error Handling Enhancements:
- Improved JSON parse error messages with detailed context
- Better error guidance when tool calls have missing parameters
- Enhanced logging with parameter information for debugging

Configuration Fixes:
- Handle optional Daytona configuration gracefully
- Fixed initialization when daytona_api_key is not provided
The session folder was being created relative to the current directory
instead of inside the workspace root. This caused the agent to fail when
trying to write files because the paths didn't match.

Changes:
- Session folder now created at: workspace/output/session_YYYYMMDD_HHMMSS/
- Updated system prompt to provide absolute paths for file operations
- Verified that files are now created successfully in the correct location

Fixes the FileNotFoundError when creating files in session subfolders.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fixing output for now

1 participant