Files
loki/scripts/run-codex-task.sh
T
g-butandClaude Sonnet 4.6 0795e3d851 chore: commit accumulated session work across control, orchestration, and schema
- Control panel: ProjectTile, control-presenter, project-card-helpers,
  project-composer, project-intent-panel, control-panel-helpers updates
- Orchestration: run route hardening, adapters, contract, state refinements
- Schema: orchestration-events, orchestration-runs, project-states,
  prompt-history, user-projects additive field updates
- Queries: orchestration-runs, project-states, prompt-history, user-projects
  extended query support
- Agents: agent-catalog, agent-config, agent-preferences, agent-registry
  updates including Gemini runner script
- Beacon: route and PyQt popup/bridge script updates
- System: AutopilotCard and JobDetail minor updates
- Shared: DevLogList, SessionHandoff, project-activity-ledger
- Hooks: use-control-data, use-project-lifecycle-sync
- Config: prompt-library additions, session-handoff-copy
- Lib: control-fast-state, control-types, crons, crons-shared,
  orchestration state refinements

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 14:09:48 +02:00

39 lines
817 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
if [ "$#" -lt 3 ]; then
echo "usage: run-codex-task.sh <tab> <project-dir> <prompt-file> [model]" >&2
exit 2
fi
TAB_NAME="$1"
PROJECT_DIR="$2"
PROMPT_FILE="$3"
MODEL="${4:-gpt-5.4}"
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
SESSION_DIR="${AGENT_SESSIONS_DIR:-$HOME/.claude/sessions}"
mkdir -p "$SESSION_DIR"
source "$HOME/.bashrc" >/dev/null 2>&1 || true
cd "$PROJECT_DIR"
status=0
codex exec \
--model "$MODEL" \
--cd "$PROJECT_DIR" \
--sandbox workspace-write \
--ask-for-approval never \
--add-dir "$SESSION_DIR" \
- < "$PROMPT_FILE" || status=$?
rm -f "$PROMPT_FILE"
printf '%s' "$PROJECT_DIR" \
| jq -Rs '{cwd:.}' \
| AGENT_TAB_NAME="$TAB_NAME" AGENT_CURRENT_AGENT="codex" "$ROOT/scripts/agent-hook-bridge.sh" stop || true
exit "$status"