Skip to content

Fix critical bugs preventing CLI execution#1

Open
jeffzeng-aws wants to merge 1 commit intomadhurprash:mainfrom
jeffzeng-aws:fix/critical-bugs-for-cli-execution
Open

Fix critical bugs preventing CLI execution#1
jeffzeng-aws wants to merge 1 commit intomadhurprash:mainfrom
jeffzeng-aws:fix/critical-bugs-for-cli-execution

Conversation

@jeffzeng-aws
Copy link

  1. Fix --query CLI argument not working

    • The argument was parsed but never used, always running interactive mode
    • Added conditional to run single-query mode when args.query is provided
  2. Fix session not waiting for READY state

    • After start_code_interpreter_session(), code tried to use session immediately while still in "STARTING" state
    • Added polling loop (up to 2 min) to wait for READY status
  3. Fix Python module namespace bug in utils.py

    • When running as script (main), globals weren't visible to utils.py because it imported by module name (creating separate module instance)
    • Changed to sys.modules['main'] to access actual running module globals

🤖 Generated with Claude Code

1. Fix --query CLI argument not working
   - The argument was parsed but never used, always running interactive mode
   - Added conditional to run single-query mode when args.query is provided

2. Fix session not waiting for READY state
   - After start_code_interpreter_session(), code tried to use session
     immediately while still in "STARTING" state
   - Added polling loop (up to 2 min) to wait for READY status

3. Fix Python module namespace bug in utils.py
   - When running as script (__main__), globals weren't visible to utils.py
     because it imported by module name (creating separate module instance)
   - Changed to sys.modules['__main__'] to access actual running module globals

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant